@ngx-smz/layout 21.10.0-next.2 → 21.10.0-next.21
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/README.md +19 -63
- package/fesm2022/ngx-smz-layout.mjs +470 -461
- package/fesm2022/ngx-smz-layout.mjs.map +1 -1
- package/package.json +6 -1
- package/resources/layout/_core.scss +24 -24
- package/resources/layout/_footer.scss +8 -8
- package/resources/layout/_main.scss +13 -13
- package/resources/layout/_menu.scss +160 -160
- package/resources/layout/_mixins.scss +15 -15
- package/resources/layout/_preloading.scss +47 -47
- package/resources/layout/_responsive.scss +117 -117
- package/resources/layout/_topbar.scss +204 -204
- package/resources/layout/_typography.scss +68 -68
- package/resources/layout/_utils.scss +25 -25
- package/resources/layout/layout.scss +13 -13
- package/resources/layout/legacy-layout.scss +2 -2
- package/resources/layout/variables/_legacy-common.scss +55 -55
- package/types/ngx-smz-layout.d.ts +17 -25
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
h1,
|
|
2
|
-
h2,
|
|
3
|
-
h3,
|
|
4
|
-
h4,
|
|
5
|
-
h5,
|
|
6
|
-
h6 {
|
|
7
|
-
margin: 1.5rem 0 1rem 0;
|
|
8
|
-
font-family: inherit;
|
|
9
|
-
font-weight: 700;
|
|
10
|
-
line-height: 1.5;
|
|
11
|
-
color: var(--text-color);
|
|
12
|
-
|
|
13
|
-
&:first-child {
|
|
14
|
-
margin-top: 0;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
h1 {
|
|
19
|
-
font-size: 2.5rem;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
h2 {
|
|
23
|
-
font-size: 2rem;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
h3 {
|
|
27
|
-
font-size: 1.75rem;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
h4 {
|
|
31
|
-
font-size: 1.5rem;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
h5 {
|
|
35
|
-
font-size: 1.25rem;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
h6 {
|
|
39
|
-
font-size: 1rem;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
mark {
|
|
43
|
-
background: #fff8e1;
|
|
44
|
-
padding: 0.25rem 0.4rem;
|
|
45
|
-
border-radius: var(--content-border-radius);
|
|
46
|
-
font-family: monospace;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
blockquote {
|
|
50
|
-
margin: 1rem 0;
|
|
51
|
-
padding: 0 2rem;
|
|
52
|
-
border-left: 4px solid #90a4ae;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
hr {
|
|
56
|
-
border-top: solid var(--surface-border);
|
|
57
|
-
border-width: 1px 0 0 0;
|
|
58
|
-
margin: 1rem 0;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
p {
|
|
62
|
-
margin: 0 0 1rem 0;
|
|
63
|
-
line-height: 1.5;
|
|
64
|
-
|
|
65
|
-
&:last-child {
|
|
66
|
-
margin-bottom: 0;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
1
|
+
h1,
|
|
2
|
+
h2,
|
|
3
|
+
h3,
|
|
4
|
+
h4,
|
|
5
|
+
h5,
|
|
6
|
+
h6 {
|
|
7
|
+
margin: 1.5rem 0 1rem 0;
|
|
8
|
+
font-family: inherit;
|
|
9
|
+
font-weight: 700;
|
|
10
|
+
line-height: 1.5;
|
|
11
|
+
color: var(--text-color);
|
|
12
|
+
|
|
13
|
+
&:first-child {
|
|
14
|
+
margin-top: 0;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
h1 {
|
|
19
|
+
font-size: 2.5rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
h2 {
|
|
23
|
+
font-size: 2rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
h3 {
|
|
27
|
+
font-size: 1.75rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
h4 {
|
|
31
|
+
font-size: 1.5rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
h5 {
|
|
35
|
+
font-size: 1.25rem;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
h6 {
|
|
39
|
+
font-size: 1rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
mark {
|
|
43
|
+
background: #fff8e1;
|
|
44
|
+
padding: 0.25rem 0.4rem;
|
|
45
|
+
border-radius: var(--content-border-radius);
|
|
46
|
+
font-family: monospace;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
blockquote {
|
|
50
|
+
margin: 1rem 0;
|
|
51
|
+
padding: 0 2rem;
|
|
52
|
+
border-left: 4px solid #90a4ae;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
hr {
|
|
56
|
+
border-top: solid var(--surface-border);
|
|
57
|
+
border-width: 1px 0 0 0;
|
|
58
|
+
margin: 1rem 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
p {
|
|
62
|
+
margin: 0 0 1rem 0;
|
|
63
|
+
line-height: 1.5;
|
|
64
|
+
|
|
65
|
+
&:last-child {
|
|
66
|
+
margin-bottom: 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/* Utils */
|
|
2
|
-
.clearfix:after {
|
|
3
|
-
content: ' ';
|
|
4
|
-
display: block;
|
|
5
|
-
clear: both;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.card {
|
|
9
|
-
background: var(--surface-card);
|
|
10
|
-
padding: 2rem;
|
|
11
|
-
margin-bottom: 2rem;
|
|
12
|
-
border-radius: var(--content-border-radius);
|
|
13
|
-
|
|
14
|
-
&:last-child {
|
|
15
|
-
margin-bottom: 0;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.p-toast {
|
|
20
|
-
&.p-toast-top-right,
|
|
21
|
-
&.p-toast-top-left,
|
|
22
|
-
&.p-toast-top-center {
|
|
23
|
-
top: 100px;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
/* Utils */
|
|
2
|
+
.clearfix:after {
|
|
3
|
+
content: ' ';
|
|
4
|
+
display: block;
|
|
5
|
+
clear: both;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.card {
|
|
9
|
+
background: var(--surface-card);
|
|
10
|
+
padding: 2rem;
|
|
11
|
+
margin-bottom: 2rem;
|
|
12
|
+
border-radius: var(--content-border-radius);
|
|
13
|
+
|
|
14
|
+
&:last-child {
|
|
15
|
+
margin-bottom: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.p-toast {
|
|
20
|
+
&.p-toast-top-right,
|
|
21
|
+
&.p-toast-top-left,
|
|
22
|
+
&.p-toast-top-center {
|
|
23
|
+
top: 100px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
@use './variables/_common';
|
|
2
|
-
@use './variables/_light';
|
|
3
|
-
@use './variables/_dark';
|
|
4
|
-
@use './_mixins';
|
|
5
|
-
@use './_preloading';
|
|
6
|
-
@use './_core';
|
|
7
|
-
@use './_main';
|
|
8
|
-
@use './_topbar';
|
|
9
|
-
@use './_menu';
|
|
10
|
-
@use './_footer';
|
|
11
|
-
@use './_responsive';
|
|
12
|
-
@use './_utils';
|
|
13
|
-
@use './_typography';
|
|
1
|
+
@use './variables/_common';
|
|
2
|
+
@use './variables/_light';
|
|
3
|
+
@use './variables/_dark';
|
|
4
|
+
@use './_mixins';
|
|
5
|
+
@use './_preloading';
|
|
6
|
+
@use './_core';
|
|
7
|
+
@use './_main';
|
|
8
|
+
@use './_topbar';
|
|
9
|
+
@use './_menu';
|
|
10
|
+
@use './_footer';
|
|
11
|
+
@use './_responsive';
|
|
12
|
+
@use './_utils';
|
|
13
|
+
@use './_typography';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@use './variables/_legacy-common';
|
|
2
|
-
@use './variables/_light';
|
|
1
|
+
@use './variables/_legacy-common';
|
|
2
|
+
@use './variables/_light';
|
|
3
3
|
@use './variables/_dark';
|
|
@@ -1,55 +1,55 @@
|
|
|
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
|
-
|
|
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
|
-
--content-padding: 1.25rem;
|
|
50
|
-
--inline-spacing: 0.5rem;
|
|
51
|
-
--border-radius: 6px;
|
|
52
|
-
--surface-ground: #f1f5f9;
|
|
53
|
-
--surface-section: #ffffff;
|
|
54
|
-
--focus-ring: 0 0 0 var(--focus-ring-width) var(--focus-ring-color);
|
|
55
|
-
}
|
|
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
|
+
|
|
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
|
+
--content-padding: 1.25rem;
|
|
50
|
+
--inline-spacing: 0.5rem;
|
|
51
|
+
--border-radius: 6px;
|
|
52
|
+
--surface-ground: #f1f5f9;
|
|
53
|
+
--surface-section: #ffffff;
|
|
54
|
+
--focus-ring: 0 0 0 var(--focus-ring-width) var(--focus-ring-color);
|
|
55
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ComponentRef, Signal, ElementRef, Renderer2, WritableSignal, InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { ComponentRef, Signal, ElementRef, OnDestroy, Renderer2, WritableSignal, InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
3
3
|
import { Router, Routes } from '@angular/router';
|
|
4
4
|
import * as rxjs from 'rxjs';
|
|
5
5
|
import { Subscription } from 'rxjs';
|
|
@@ -37,7 +37,7 @@ declare class LayoutService {
|
|
|
37
37
|
menuSource$: rxjs.Observable<MenuChangeEvent>;
|
|
38
38
|
resetSource$: rxjs.Observable<unknown>;
|
|
39
39
|
configUpdate$: rxjs.Observable<LayoutConfig>;
|
|
40
|
-
overlayOpen$: rxjs.Observable<
|
|
40
|
+
overlayOpen$: rxjs.Observable<null>;
|
|
41
41
|
theme: i0.Signal<"light" | "dark">;
|
|
42
42
|
isSidebarActive: i0.Signal<boolean>;
|
|
43
43
|
isDarkTheme: i0.Signal<boolean>;
|
|
@@ -161,12 +161,12 @@ declare class AppSidebar {
|
|
|
161
161
|
static ɵcmp: i0.ɵɵComponentDeclaration<AppSidebar, "app-sidebar", never, {}, {}, never, never, true, never>;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
declare class AppLayout {
|
|
164
|
+
declare class AppLayout implements OnDestroy {
|
|
165
165
|
layoutService: LayoutService;
|
|
166
166
|
renderer: Renderer2;
|
|
167
167
|
router: Router;
|
|
168
168
|
overlayMenuOpenSubscription: Subscription;
|
|
169
|
-
menuOutsideClickListener:
|
|
169
|
+
menuOutsideClickListener: (() => void) | null;
|
|
170
170
|
appSidebar: AppSidebar;
|
|
171
171
|
appTopBar: AppTopbar;
|
|
172
172
|
constructor(layoutService: LayoutService, renderer: Renderer2, router: Router);
|
|
@@ -174,14 +174,7 @@ declare class AppLayout {
|
|
|
174
174
|
hideMenu(): void;
|
|
175
175
|
blockBodyScroll(): void;
|
|
176
176
|
unblockBodyScroll(): void;
|
|
177
|
-
get containerClass():
|
|
178
|
-
'layout-overlay': boolean;
|
|
179
|
-
'layout-static': boolean;
|
|
180
|
-
'layout-static-inactive': boolean;
|
|
181
|
-
'layout-overlay-active': boolean;
|
|
182
|
-
'layout-mobile-active': boolean;
|
|
183
|
-
'layout-sidebar-hidden': boolean;
|
|
184
|
-
};
|
|
177
|
+
get containerClass(): Record<string, boolean>;
|
|
185
178
|
ngOnDestroy(): void;
|
|
186
179
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppLayout, never>;
|
|
187
180
|
static ɵcmp: i0.ɵɵComponentDeclaration<AppLayout, "app-layout", never, {}, {}, never, never, true, never>;
|
|
@@ -289,8 +282,7 @@ declare function configureSmzUILayout(): SmzUILayoutProvisionBuilder;
|
|
|
289
282
|
*
|
|
290
283
|
* @param resolveHasClaim Optional factory run **during app initialization** (injection context).
|
|
291
284
|
*/
|
|
292
|
-
declare function provideSmzUILayout(initializers: () => SmzUILayoutConfigType[]): EnvironmentProviders;
|
|
293
|
-
declare function provideSmzUILayout(initializers: () => SmzUILayoutConfigType[], resolveHasClaim: () => (claims: string[]) => boolean): EnvironmentProviders;
|
|
285
|
+
declare function provideSmzUILayout(initializers: () => SmzUILayoutConfigType[], resolveHasClaim?: () => (claims: string[]) => boolean): EnvironmentProviders;
|
|
294
286
|
|
|
295
287
|
declare class AppFloatingConfigurator {
|
|
296
288
|
LayoutService: LayoutService;
|
|
@@ -376,9 +368,9 @@ interface LoggingConfig {
|
|
|
376
368
|
restrictedScopes?: (LoggingScope | string)[];
|
|
377
369
|
}
|
|
378
370
|
|
|
379
|
-
|
|
371
|
+
interface SmzLayoutLoggingConfigType {
|
|
380
372
|
logging: WritableSignal<LoggingConfig>;
|
|
381
|
-
}
|
|
373
|
+
}
|
|
382
374
|
declare class SmzLayoutLogging {
|
|
383
375
|
logging: WritableSignal<LoggingConfig>;
|
|
384
376
|
setConfig(config: SmzLayoutLoggingConfigType): void;
|
|
@@ -390,10 +382,10 @@ declare const SMZ_LAYOUT_LOGGING_CONFIG: InjectionToken<SmzLayoutLoggingConfigTy
|
|
|
390
382
|
declare function provideSmzLayoutLogging(initializers: (() => SmzLayoutLoggingConfigType[])): EnvironmentProviders;
|
|
391
383
|
|
|
392
384
|
interface ScopedLogger {
|
|
393
|
-
log(message?:
|
|
394
|
-
warn(message?:
|
|
395
|
-
error(message?:
|
|
396
|
-
debug(message?:
|
|
385
|
+
log(message?: unknown, ...optionalParams: unknown[]): void;
|
|
386
|
+
warn(message?: unknown, ...optionalParams: unknown[]): void;
|
|
387
|
+
error(message?: unknown, ...optionalParams: unknown[]): void;
|
|
388
|
+
debug(message?: unknown, ...optionalParams: unknown[]): void;
|
|
397
389
|
}
|
|
398
390
|
declare class LoggingService {
|
|
399
391
|
private configFn;
|
|
@@ -401,17 +393,17 @@ declare class LoggingService {
|
|
|
401
393
|
private levelRank;
|
|
402
394
|
/** expose current settings */
|
|
403
395
|
readonly isEnabled: i0.Signal<boolean>;
|
|
404
|
-
readonly currentLevel: i0.Signal<"
|
|
396
|
+
readonly currentLevel: i0.Signal<"error" | "debug" | "info" | "warn">;
|
|
405
397
|
readonly activeScopes: i0.Signal<string[]>;
|
|
406
398
|
/** toggle logging global */
|
|
407
399
|
enable(): void;
|
|
408
400
|
disable(): void;
|
|
409
401
|
toggle(): void;
|
|
410
402
|
private shouldLog;
|
|
411
|
-
log(message?:
|
|
412
|
-
warn(message?:
|
|
413
|
-
error(message?:
|
|
414
|
-
debug(message?:
|
|
403
|
+
log(message?: unknown, ...optionalParams: unknown[]): void;
|
|
404
|
+
warn(message?: unknown, ...optionalParams: unknown[]): void;
|
|
405
|
+
error(message?: unknown, ...optionalParams: unknown[]): void;
|
|
406
|
+
debug(message?: unknown, ...optionalParams: unknown[]): void;
|
|
415
407
|
/**
|
|
416
408
|
* Retorna um logger com prefixo [owner] e restringe pelos scopes do config
|
|
417
409
|
* owner agora é um LoggingScope ou string
|