@ngx-smz/layout 21.1.21 → 21.9.0-next.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/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@ngx-smz/layout",
3
- "version": "21.1.21",
4
- "peerDependencies": {},
3
+ "version": "21.9.0-next.1",
4
+ "peerDependencies": {
5
+ "@ngx-smz/ui-kit": ">=21.9.0-0",
6
+ "@ngx-smz/core": ">=21.9.0-0"
7
+ },
5
8
  "dependencies": {
6
9
  "tslib": "^2.3.0"
7
10
  },
@@ -57,6 +57,13 @@
57
57
  }
58
58
  }
59
59
 
60
+ &.layout-sidebar-hidden {
61
+ .layout-main-container {
62
+ margin-left: 0;
63
+ padding-left: 2rem;
64
+ }
65
+ }
66
+
60
67
  .layout-mask {
61
68
  display: none;
62
69
  }
@@ -1,20 +1,20 @@
1
- :root {
2
- --primary-color: var(--p-primary-color);
3
- --primary-contrast-color: var(--p-primary-contrast-color);
4
- --text-color: var(--p-text-color);
5
- --text-color-secondary: var(--p-text-muted-color);
6
- --surface-border: var(--p-content-border-color);
7
- --surface-card: var(--p-content-background);
8
- --surface-hover: var(--p-content-hover-background);
9
- --surface-overlay: var(--p-overlay-popover-background);
10
- --transition-duration: var(--p-transition-duration);
11
- --maskbg: var(--p-mask-background);
12
- --content-border-radius: var(--p-content-border-radius);
13
- --layout-section-transition-duration: 0.2s;
14
- --element-transition-duration: var(--p-transition-duration);
15
- --focus-ring-width: var(--p-focus-ring-width);
16
- --focus-ring-style: var(--p-focus-ring-style);
17
- --focus-ring-color: var(--p-focus-ring-color);
18
- --focus-ring-offset: var(--p-focus-ring-offset);
19
- --focus-ring-shadow: var(--p-focus-ring-shadow);
20
- }
1
+ :root {
2
+ --primary-color: rgb(var(--smz-color-primary));
3
+ --primary-contrast-color: rgb(var(--smz-color-on-primary));
4
+ --text-color: rgb(var(--smz-color-fg));
5
+ --text-color-secondary: rgb(var(--smz-color-fg-muted));
6
+ --surface-border: rgb(var(--smz-color-line));
7
+ --surface-card: rgb(var(--smz-color-surface-1));
8
+ --surface-hover: rgb(var(--smz-color-surface-3));
9
+ --surface-overlay: rgb(var(--smz-color-surface-2));
10
+ --transition-duration: var(--smz-duration);
11
+ --maskbg: rgb(0 0 0 / 0.4);
12
+ --content-border-radius: var(--smz-radius-card);
13
+ --layout-section-transition-duration: 0.2s;
14
+ --element-transition-duration: var(--smz-duration);
15
+ --focus-ring-width: 2px;
16
+ --focus-ring-style: solid;
17
+ --focus-ring-color: rgb(var(--smz-color-focus));
18
+ --focus-ring-offset: 2px;
19
+ --focus-ring-shadow: none;
20
+ }
@@ -1,5 +1,5 @@
1
- :root[class*='app-dark'] {
2
- --surface-ground: var(--p-surface-950);
3
- --code-background: var(--p-surface-800);
4
- --code-color: var(--p-surface-100);
5
- }
1
+ :root[class*='app-dark'] {
2
+ --surface-ground: rgb(var(--smz-color-surface-0));
3
+ --code-background: #1e293b;
4
+ --code-color: #f1f5f9;
5
+ }
@@ -1,55 +1,55 @@
1
1
  :root {
2
- --primary-color: var(--p-primary-color);
3
- --primary-contrast-color: var(--p-primary-contrast-color);
4
- --text-color: var(--p-text-color);
5
- --text-color-secondary: var(--p-text-muted-color);
6
- --surface-border: var(--p-content-border-color);
7
- --surface-card: var(--p-content-background);
8
- --surface-hover: var(--p-content-hover-background);
9
- --surface-overlay: var(--p-overlay-popover-background);
10
- --transition-duration: var(--p-transition-duration);
11
- --maskbg: var(--p-mask-background);
12
- --content-border-radius: var(--p-content-border-radius);
2
+ --primary-color: rgb(var(--smz-color-primary));
3
+ --primary-contrast-color: rgb(var(--smz-color-on-primary));
4
+ --text-color: rgb(var(--smz-color-fg));
5
+ --text-color-secondary: rgb(var(--smz-color-fg-muted));
6
+ --surface-border: rgb(var(--smz-color-line));
7
+ --surface-card: rgb(var(--smz-color-surface-1));
8
+ --surface-hover: rgb(var(--smz-color-surface-3));
9
+ --surface-overlay: rgb(var(--smz-color-surface-2));
10
+ --transition-duration: var(--smz-duration);
11
+ --maskbg: rgb(0 0 0 / 0.4);
12
+ --content-border-radius: var(--smz-radius-card);
13
13
  --layout-section-transition-duration: 0.2s;
14
- --element-transition-duration: var(--p-transition-duration);
15
- --focus-ring-width: var(--p-focus-ring-width);
16
- --focus-ring-style: var(--p-focus-ring-style);
17
- --focus-ring-color: var(--p-focus-ring-color);
18
- --focus-ring-offset: var(--p-focus-ring-offset);
19
- --focus-ring-shadow: var(--p-focus-ring-shadow);
14
+ --element-transition-duration: var(--smz-duration);
15
+ --focus-ring-width: 2px;
16
+ --focus-ring-style: solid;
17
+ --focus-ring-color: rgb(var(--smz-color-focus));
18
+ --focus-ring-offset: 2px;
19
+ --focus-ring-shadow: none;
20
20
 
21
- --surface-a: var(--p-surface-0);
22
- --surface-b: var(--p-surface-50);
23
- --surface-c: var(--p-surface-100);
24
- --surface-d: var(--p-surface-200);
25
- --surface-e: var(--p-surface-0);
26
- --surface-f: var(--p-surface-0);
27
- --primary-color-text: var(--p-primary-contrast-color);
28
- --surface-0: var(--p-surface-0);
29
- --surface-50: var(--p-surface-50);
30
- --surface-100: var(--p-surface-100);
31
- --surface-200: var(--p-surface-200);
32
- --surface-300: var(--p-surface-300);
33
- --surface-400: var(--p-surface-400);
34
- --surface-500: var(--p-surface-500);
35
- --surface-600: var(--p-surface-600);
36
- --surface-700: var(--p-surface-700);
37
- --surface-800: var(--p-surface-800);
38
- --surface-900: var(--p-surface-900);
39
- --gray-50: var(--p-surface-50);
40
- --gray-100: var(--p-surface-100);
41
- --gray-200: var(--p-surface-200);
42
- --gray-300: var(--p-surface-300);
43
- --gray-400: var(--p-surface-400);
44
- --gray-500: var(--p-surface-500);
45
- --gray-600: var(--p-surface-600);
46
- --gray-700: var(--p-surface-700);
47
- --gray-800: var(--p-surface-800);
48
- --gray-900: var(--p-surface-900);
21
+ --surface-a: #ffffff;
22
+ --surface-b: #f8fafc;
23
+ --surface-c: #f1f5f9;
24
+ --surface-d: #e2e8f0;
25
+ --surface-e: #ffffff;
26
+ --surface-f: #ffffff;
27
+ --primary-color-text: rgb(var(--smz-color-on-primary));
28
+ --surface-0: #ffffff;
29
+ --surface-50: #f8fafc;
30
+ --surface-100: #f1f5f9;
31
+ --surface-200: #e2e8f0;
32
+ --surface-300: #cbd5e1;
33
+ --surface-400: #94a3b8;
34
+ --surface-500: #64748b;
35
+ --surface-600: #475569;
36
+ --surface-700: #334155;
37
+ --surface-800: #1e293b;
38
+ --surface-900: #0f172a;
39
+ --gray-50: #f8fafc;
40
+ --gray-100: #f1f5f9;
41
+ --gray-200: #e2e8f0;
42
+ --gray-300: #cbd5e1;
43
+ --gray-400: #94a3b8;
44
+ --gray-500: #64748b;
45
+ --gray-600: #475569;
46
+ --gray-700: #334155;
47
+ --gray-800: #1e293b;
48
+ --gray-900: #0f172a;
49
49
  --content-padding: 1.25rem;
50
50
  --inline-spacing: 0.5rem;
51
51
  --border-radius: 6px;
52
- --surface-ground: var(--p-surface-100);
53
- --surface-section: var(--p-surface-0);
52
+ --surface-ground: #f1f5f9;
53
+ --surface-section: #ffffff;
54
54
  --focus-ring: 0 0 0 var(--focus-ring-width) var(--focus-ring-color);
55
55
  }
@@ -1,5 +1,5 @@
1
- :root {
2
- --surface-ground: var(--p-surface-100);
3
- --code-background: var(--p-surface-900);
4
- --code-color: var(--p-surface-200);
5
- }
1
+ :root {
2
+ --surface-ground: rgb(var(--smz-color-surface-0));
3
+ --code-background: #0f172a;
4
+ --code-color: #e2e8f0;
5
+ }
@@ -4,8 +4,7 @@ import { Router, Routes } from '@angular/router';
4
4
  import * as rxjs from 'rxjs';
5
5
  import { Subscription } from 'rxjs';
6
6
  import { ComponentType } from '@angular/cdk/overlay';
7
- import { PrimeNG } from 'primeng/config';
8
- import { MenuItem } from 'primeng/api';
7
+ import { SmzUiMenuItem } from '@ngx-smz/ui-kit';
9
8
 
10
9
  interface LayoutConfig {
11
10
  preset?: string;
@@ -13,6 +12,8 @@ interface LayoutConfig {
13
12
  surface?: string | undefined | null;
14
13
  darkTheme?: boolean;
15
14
  menuMode?: string;
15
+ /** When false, the sidebar is not rendered and main content uses full width. Defaults to true. */
16
+ showSidebar?: boolean;
16
17
  }
17
18
  interface LayoutState {
18
19
  staticMenuDesktopInactive?: boolean;
@@ -114,7 +115,6 @@ declare class PageTitleService {
114
115
  }
115
116
 
116
117
  declare class AppTopbar {
117
- primeNG: PrimeNG;
118
118
  data: Signal<Topbar>;
119
119
  layoutService: LayoutService;
120
120
  navigationService: NavigationService;
@@ -129,6 +129,8 @@ interface Topbar {
129
129
  showBackButton?: boolean;
130
130
  showConfigurator?: boolean;
131
131
  showDarkModeToggle?: boolean;
132
+ /** When false, hides profile/feature menus on the right of the topbar. Defaults to visible when omitted. */
133
+ showProfileMenu?: boolean;
132
134
  logoPath?: {
133
135
  light?: string;
134
136
  dark?: string;
@@ -140,7 +142,7 @@ interface Topbar {
140
142
  placeholder?: string;
141
143
  label?: string;
142
144
  tooltip?: string;
143
- menuItems?: MenuItem[];
145
+ menuItems?: SmzUiMenuItem[];
144
146
  }[];
145
147
  menuItems?: {
146
148
  icon?: string;
@@ -178,6 +180,7 @@ declare class AppLayout {
178
180
  'layout-static-inactive': boolean;
179
181
  'layout-overlay-active': boolean;
180
182
  'layout-mobile-active': boolean;
183
+ 'layout-sidebar-hidden': boolean;
181
184
  };
182
185
  ngOnDestroy(): void;
183
186
  static ɵfac: i0.ɵɵFactoryDeclaration<AppLayout, never>;
@@ -198,7 +201,7 @@ interface Footer {
198
201
  }
199
202
 
200
203
  interface SmzUILayoutConfigType {
201
- sidebar: WritableSignal<MenuItem[]>;
204
+ sidebar: WritableSignal<SmzUiMenuItem[]>;
202
205
  footer: WritableSignal<Footer>;
203
206
  topbar: WritableSignal<Topbar>;
204
207
  layout: WritableSignal<LayoutConfig>;
@@ -209,12 +212,12 @@ declare class SmzUILayout {
209
212
  /**
210
213
  * Writable menu graph from the host (`SMZ_UI_LAYOUT_CONFIG.sidebar`). Mutations here trigger {@link sidebar}.
211
214
  */
212
- sidebarWritable: WritableSignal<MenuItem[]>;
215
+ sidebarWritable: WritableSignal<SmzUiMenuItem[]>;
213
216
  /**
214
217
  * Menu prepared for shells such as Hephaestus: entries denied by {@link SmzUILayoutConfigType.hasClaim}
215
218
  * use `visible: false` so templates only need visibility rules.
216
219
  */
217
- readonly sidebar: i0.Signal<MenuItem[]>;
220
+ readonly sidebar: i0.Signal<SmzUiMenuItem[]>;
218
221
  private layoutFeature;
219
222
  footer: WritableSignal<Footer>;
220
223
  topbar: WritableSignal<Topbar>;
@@ -263,7 +266,7 @@ declare class SmzUILayoutProvisionBuilder {
263
266
  * Do not combine with `.withSidebar()` / `.withFooter()` / …
264
267
  */
265
268
  withFeatures(factory: () => SmzUILayoutConfigType[]): this;
266
- withSidebar(sidebar: WritableSignal<MenuItem[]>): this;
269
+ withSidebar(sidebar: WritableSignal<SmzUiMenuItem[]>): this;
267
270
  withFooter(footer: WritableSignal<Footer>): this;
268
271
  withTopbar(topbar: WritableSignal<Topbar>): this;
269
272
  /** Writable layout chrome config (preset, theme flags, menu mode, …). */