@elderbyte/ngx-starter 20.5.0-alpha.2 → 20.5.0-alpha.3
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
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
@use '../components/elder-table-theme' as elder-table;
|
|
19
19
|
@use '../components/elder-scrollbar-theme' as elder-scrollbar;
|
|
20
20
|
@use '../components/mat-badge-theme' as mat-badge;
|
|
21
|
+
@use '../components/elder-static-nav-theme' as elder-static-nav;
|
|
22
|
+
|
|
21
23
|
// Create a theme.
|
|
22
24
|
@mixin starter-theme($theme) {
|
|
23
25
|
$theme: elder-set-defaults-fn.validate-and-set-defaults($theme);
|
|
@@ -49,4 +51,5 @@
|
|
|
49
51
|
@include elder-table.theme($theme);
|
|
50
52
|
@include elder-scrollbar.theme();
|
|
51
53
|
@include mat-badge.theme();
|
|
54
|
+
@include elder-static-nav.theme();
|
|
52
55
|
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
@mixin theme {
|
|
2
|
+
// Local SCSS Variables
|
|
3
|
+
$nav-width: 82px;
|
|
4
|
+
$nav-icon-size: 32px;
|
|
5
|
+
$nav-icon-container-width: 48px;
|
|
6
|
+
$nav-icon-container-height: 40px;
|
|
7
|
+
$nav-icon-border-radius: 10px;
|
|
8
|
+
$nav-text-width: 66px;
|
|
9
|
+
$nav-padding-vertical: 12px;
|
|
10
|
+
$nav-gap-small: 3px;
|
|
11
|
+
$nav-font-size: 12px;
|
|
12
|
+
$light-text-color: color-mix(
|
|
13
|
+
in srgb,
|
|
14
|
+
var(--md-sys-color-outline) 50%,
|
|
15
|
+
var(--md-sys-color-on-surface)
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
.elder-static-nav {
|
|
19
|
+
// Overwrite css variables
|
|
20
|
+
--elder-nav-item-height: auto;
|
|
21
|
+
--elder-nav-link-hover-color: transparent;
|
|
22
|
+
--elder-nav-link-active-color: transparent;
|
|
23
|
+
|
|
24
|
+
// Main container layout
|
|
25
|
+
width: $nav-width;
|
|
26
|
+
padding: 0 0 0 var(--elder-pane-padding);
|
|
27
|
+
flex: 1 1 0%;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
min-height: 0;
|
|
30
|
+
|
|
31
|
+
// Base styles for all elements
|
|
32
|
+
* {
|
|
33
|
+
transition: none !important;
|
|
34
|
+
line-height: 1 !important;
|
|
35
|
+
text-align: center !important;
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
color: $light-text-color !important;
|
|
38
|
+
|
|
39
|
+
&:hover {
|
|
40
|
+
color: var(--md-sys-color-on-surface) !important;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Typography styles
|
|
45
|
+
*:not(.mat-icon) {
|
|
46
|
+
font-size: $nav-font-size !important;
|
|
47
|
+
text-wrap: wrap;
|
|
48
|
+
white-space: normal;
|
|
49
|
+
word-wrap: break-word;
|
|
50
|
+
word-break: break-word;
|
|
51
|
+
overflow-wrap: break-word;
|
|
52
|
+
hyphens: auto;
|
|
53
|
+
text-align: center;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Layout containers
|
|
57
|
+
.elder-nav-list-full {
|
|
58
|
+
max-width: 100%;
|
|
59
|
+
width: 100%;
|
|
60
|
+
min-width: unset;
|
|
61
|
+
justify-content: stretch;
|
|
62
|
+
align-items: stretch;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.mat-mdc-nav-list {
|
|
66
|
+
padding: 0 !important;
|
|
67
|
+
overflow-x: hidden !important;
|
|
68
|
+
overflow-y: auto !important;
|
|
69
|
+
align-items: stretch !important;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.nav-group-items-container {
|
|
73
|
+
padding: 0 !important;
|
|
74
|
+
align-items: center;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.layout-row {
|
|
78
|
+
flex-direction: column !important;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Gap utilities
|
|
82
|
+
.gap-md,
|
|
83
|
+
.gap-lg {
|
|
84
|
+
gap: $nav-gap-small !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Navigation group buttons
|
|
88
|
+
.nav-group-button,
|
|
89
|
+
.nav-group-button-closed {
|
|
90
|
+
height: auto !important;
|
|
91
|
+
padding: $nav-padding-vertical 0 0 0 !important;
|
|
92
|
+
justify-content: center !important;
|
|
93
|
+
align-items: center !important;
|
|
94
|
+
text-align: center;
|
|
95
|
+
|
|
96
|
+
* {
|
|
97
|
+
gap: 0 !important;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.nav-group-button-active .mat-icon {
|
|
102
|
+
background-color: var(--md-sys-color-primary-container) !important;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Navigation links
|
|
106
|
+
.nav-link {
|
|
107
|
+
padding: 0 !important;
|
|
108
|
+
height: unset !important; // Override default 48px height when needed
|
|
109
|
+
|
|
110
|
+
span {
|
|
111
|
+
display: block;
|
|
112
|
+
text-align: center;
|
|
113
|
+
width: $nav-text-width;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.nav-link-active {
|
|
118
|
+
&,
|
|
119
|
+
* {
|
|
120
|
+
color: var(--md-sys-color-primary) !important;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.mat-icon {
|
|
124
|
+
background-color: var(--md-sys-color-primary-container) !important;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Icon styling
|
|
129
|
+
.nav-group-button .mat-icon,
|
|
130
|
+
.nav-link .mat-icon {
|
|
131
|
+
height: $nav-icon-container-height !important;
|
|
132
|
+
width: $nav-icon-container-width !important;
|
|
133
|
+
font-size: $nav-icon-size !important;
|
|
134
|
+
line-height: 1 !important;
|
|
135
|
+
padding: 4px 8px !important;
|
|
136
|
+
border-radius: $nav-icon-border-radius !important;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// List items
|
|
140
|
+
.mdc-list-item {
|
|
141
|
+
padding-top: $nav-padding-vertical !important;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Menu-specific styling (outside of .elder-static-nav)
|
|
146
|
+
.nav-group-in-menu .nav-link .mat-icon {
|
|
147
|
+
// Hide icons in menus to prevent text misalignment
|
|
148
|
+
// Icons in sub-items typically aren't used and cause layout issues
|
|
149
|
+
display: none;
|
|
150
|
+
}
|
|
151
|
+
}
|