@main-class/template 1.20.5 → 1.22.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.
- package/bundles/main-class-template.umd.js +41 -9
- package/bundles/main-class-template.umd.js.map +1 -1
- package/bundles/main-class-template.umd.min.js +2 -2
- package/bundles/main-class-template.umd.min.js.map +1 -1
- package/esm2015/acesso/acesso.component.js +1 -1
- package/esm2015/base/base.component.js +3 -3
- package/esm2015/footer/footer.component.js +1 -1
- package/esm2015/header/header.component.js +6 -3
- package/esm2015/menu/menu.component.js +26 -4
- package/fesm2015/main-class-template.js +33 -9
- package/fesm2015/main-class-template.js.map +1 -1
- package/header/header.component.d.ts +1 -0
- package/main-class-template.metadata.json +1 -1
- package/menu/menu.component.d.ts +21 -1
- package/package.json +1 -1
- package/theming.scss +278 -128
package/theming.scss
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
@import '~@angular/material/theming';
|
|
2
2
|
|
|
3
|
+
/* ===============================================
|
|
4
|
+
MainClass 1.x — tema padrão da lib
|
|
5
|
+
------------------------------------------------
|
|
6
|
+
Uso (inalterado): @include mcl-theming($theme);
|
|
7
|
+
O mixin publica em :root a camada de tokens
|
|
8
|
+
--lib-color-* / --mcl-* derivada do tema Material,
|
|
9
|
+
consumida pelos componentes da lib.
|
|
10
|
+
=============================================== */
|
|
11
|
+
|
|
3
12
|
@mixin mcl-menu($theme) {
|
|
4
13
|
$accent: map-get($theme, accent);
|
|
5
14
|
|
|
15
|
+
/* Ativo — pílula clara elevada sobre a sidebar tintada */
|
|
6
16
|
mcl-menu .menu button.active {
|
|
7
|
-
background-color:
|
|
8
|
-
color:
|
|
17
|
+
background-color: #ffffff;
|
|
18
|
+
color: rgba(0, 0, 0, .85);
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
mcl-menu .menu button.active mat-icon {
|
|
24
|
+
color: mat-color($accent);
|
|
9
25
|
}
|
|
10
26
|
}
|
|
11
27
|
|
|
@@ -13,35 +29,24 @@
|
|
|
13
29
|
$config: mat-get-color-config($config-or-theme);
|
|
14
30
|
$accent: map-get($config, accent);
|
|
15
31
|
|
|
16
|
-
mcl-acesso {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.form h2 {
|
|
20
|
-
color: mat-color($accent);
|
|
21
|
-
}
|
|
32
|
+
mcl-acesso .form h2 {
|
|
33
|
+
color: mat-color($accent);
|
|
22
34
|
}
|
|
23
35
|
}
|
|
24
36
|
|
|
25
37
|
@mixin mcl-footer($config-or-theme) {
|
|
26
|
-
|
|
27
|
-
$primary: map-get($config, primary);
|
|
28
|
-
|
|
29
|
-
mcl-footer {
|
|
30
|
-
background-color: mat-color($primary) !important;
|
|
31
|
-
}
|
|
38
|
+
/* footer claro e discreto — o estilo vive no componente */
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
@mixin mcl-header($config-or-theme) {
|
|
35
|
-
|
|
36
|
-
$accent: map-get($config, accent);
|
|
37
|
-
|
|
38
|
-
mcl-header {
|
|
39
|
-
border-bottom: 5px solid mat-color($accent) !important;
|
|
40
|
-
}
|
|
42
|
+
/* header claro com borda neutra — o estilo vive no componente */
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
@mixin mcl-theming($theme) {
|
|
44
|
-
$
|
|
46
|
+
$config: mat-get-color-config($theme);
|
|
47
|
+
$primary: map-get($config, primary);
|
|
48
|
+
$accent: map-get($config, accent);
|
|
49
|
+
$warn: map-get($config, warn);
|
|
45
50
|
|
|
46
51
|
@include mat-core();
|
|
47
52
|
|
|
@@ -52,6 +57,31 @@
|
|
|
52
57
|
@include mcl-footer($theme);
|
|
53
58
|
@include mcl-header($theme);
|
|
54
59
|
|
|
60
|
+
/* --- Tokens da lib (derivados do tema em compile-time) --- */
|
|
61
|
+
:root {
|
|
62
|
+
--lib-color-primary: #{mat-color($primary)};
|
|
63
|
+
--lib-color-on-primary: #{mat-color($primary, default-contrast)};
|
|
64
|
+
--lib-color-accent: #{mat-color($accent)};
|
|
65
|
+
--lib-color-on-accent: #{mat-color($accent, default-contrast)};
|
|
66
|
+
--lib-color-warn: #{mat-color($warn)};
|
|
67
|
+
--lib-color-surface: #ffffff;
|
|
68
|
+
--lib-color-surface-low: #f6f7f8;
|
|
69
|
+
--lib-color-surface-container: #f1f2f4;
|
|
70
|
+
--lib-color-on-surface: #1f2428;
|
|
71
|
+
--lib-color-on-surface-variant: #6b7280;
|
|
72
|
+
--lib-color-outline-variant: #e4e6e9;
|
|
73
|
+
|
|
74
|
+
--mcl-radius-sm: 8px;
|
|
75
|
+
--mcl-radius-md: 12px;
|
|
76
|
+
--mcl-radius-lg: 16px;
|
|
77
|
+
--mcl-radius-full: 999px;
|
|
78
|
+
--mcl-shadow-1: 0 1px 2px rgba(0, 0, 0, .05), 0 1px 3px rgba(0, 0, 0, .06);
|
|
79
|
+
--mcl-shadow-2: 0 4px 12px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .05);
|
|
80
|
+
--mcl-shadow-3: 0 12px 32px rgba(0, 0, 0, .14), 0 4px 8px rgba(0, 0, 0, .06);
|
|
81
|
+
--mcl-transition: .18s ease;
|
|
82
|
+
--mcl-font: 'Inter', Asap, Roboto, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
|
|
83
|
+
}
|
|
84
|
+
|
|
55
85
|
html, body {
|
|
56
86
|
height: 100%;
|
|
57
87
|
}
|
|
@@ -59,118 +89,227 @@
|
|
|
59
89
|
body {
|
|
60
90
|
height: 100%;
|
|
61
91
|
margin: 0;
|
|
62
|
-
font-family:
|
|
63
|
-
font-size:
|
|
92
|
+
font-family: var(--mcl-font);
|
|
93
|
+
font-size: 14px;
|
|
94
|
+
line-height: 1.5;
|
|
95
|
+
background: var(--lib-color-surface-low);
|
|
96
|
+
color: var(--lib-color-on-surface);
|
|
97
|
+
-webkit-font-smoothing: antialiased;
|
|
98
|
+
-moz-osx-font-smoothing: grayscale;
|
|
99
|
+
}
|
|
64
100
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
101
|
+
h1, h2, h3, h4, h5, h6 {
|
|
102
|
+
letter-spacing: -.015em;
|
|
103
|
+
font-weight: 600;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Scrollbars finas e discretas */
|
|
107
|
+
* {
|
|
108
|
+
scrollbar-width: thin;
|
|
109
|
+
scrollbar-color: rgba(0, 0, 0, .22) transparent;
|
|
110
|
+
}
|
|
111
|
+
::-webkit-scrollbar {
|
|
112
|
+
width: 8px;
|
|
113
|
+
height: 8px;
|
|
114
|
+
}
|
|
115
|
+
::-webkit-scrollbar-track {
|
|
116
|
+
background: transparent;
|
|
117
|
+
}
|
|
118
|
+
::-webkit-scrollbar-thumb {
|
|
119
|
+
background: rgba(0, 0, 0, .22);
|
|
120
|
+
border-radius: 999px;
|
|
121
|
+
}
|
|
122
|
+
::-webkit-scrollbar-thumb:hover {
|
|
123
|
+
background: rgba(0, 0, 0, .36);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* --- Botões em pílula (Material pré-MDC) --- */
|
|
127
|
+
.mat-button-base:not(.mat-icon-button):not(.mat-fab):not(.mat-mini-fab) {
|
|
128
|
+
border-radius: 999px;
|
|
129
|
+
padding-left: 20px;
|
|
130
|
+
padding-right: 20px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* --- Form fields outline com cantos maiores --- */
|
|
134
|
+
.mat-form-field-appearance-outline .mat-form-field-outline-start {
|
|
135
|
+
border-radius: 10px 0 0 10px;
|
|
136
|
+
min-width: 10px;
|
|
137
|
+
}
|
|
138
|
+
.mat-form-field-appearance-outline .mat-form-field-outline-end {
|
|
139
|
+
border-radius: 0 10px 10px 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
mat-form-field {
|
|
143
|
+
display: block;
|
|
144
|
+
width: 100%;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
mat-icon {
|
|
148
|
+
vertical-align: middle;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* --- Cards --- */
|
|
152
|
+
body .mat-card:not([class*=mat-elevation-z]) {
|
|
153
|
+
border: 1px solid var(--lib-color-outline-variant);
|
|
154
|
+
box-shadow: var(--mcl-shadow-1);
|
|
155
|
+
border-radius: var(--mcl-radius-lg);
|
|
156
|
+
margin-bottom: 24px;
|
|
157
|
+
padding: 24px;
|
|
158
|
+
|
|
159
|
+
h2 {
|
|
160
|
+
font-weight: 600;
|
|
161
|
+
font-size: 18px;
|
|
162
|
+
line-height: 24px;
|
|
163
|
+
letter-spacing: -.01em;
|
|
164
|
+
color: var(--lib-color-on-surface);
|
|
165
|
+
margin: 0 0 20px;
|
|
70
166
|
}
|
|
167
|
+
}
|
|
71
168
|
|
|
169
|
+
mat-sidenav-container.dialog mat-sidenav-content {
|
|
72
170
|
.mat-card:not([class*=mat-elevation-z]) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
171
|
+
border-radius: var(--mcl-radius-md);
|
|
172
|
+
padding: 24px;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* --- Tabelas --- */
|
|
177
|
+
body table {
|
|
178
|
+
width: 100%;
|
|
179
|
+
border-collapse: collapse;
|
|
180
|
+
|
|
181
|
+
tr {
|
|
182
|
+
color: var(--lib-color-on-surface);
|
|
183
|
+
|
|
184
|
+
.mat-cell, .mat-footer {
|
|
185
|
+
font-size: 13px;
|
|
87
186
|
}
|
|
88
187
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
th:not(:last-child), td:not(:last-child) {
|
|
116
|
-
border-right: 1px solid #E0E0E0;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
th {
|
|
120
|
-
border-top: 2px solid mat-color($accent);
|
|
121
|
-
border-bottom: 2px solid mat-color($accent);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&:hover td {
|
|
125
|
-
background-color: mat-color($accent);
|
|
126
|
-
color: #fff;
|
|
127
|
-
border-color: mat-color($accent);
|
|
128
|
-
|
|
129
|
-
&[routerLink], &[click] {
|
|
130
|
-
cursor: pointer;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
188
|
+
th {
|
|
189
|
+
padding: 12px 16px;
|
|
190
|
+
text-align: left;
|
|
191
|
+
font-weight: 600;
|
|
192
|
+
font-size: 12px;
|
|
193
|
+
line-height: 16px;
|
|
194
|
+
letter-spacing: .02em;
|
|
195
|
+
color: var(--lib-color-on-surface-variant);
|
|
196
|
+
background: var(--lib-color-surface-low);
|
|
197
|
+
border-bottom: 1px solid var(--lib-color-outline-variant);
|
|
198
|
+
white-space: nowrap;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
td {
|
|
202
|
+
padding: 12px 16px;
|
|
203
|
+
border-bottom: 1px solid var(--lib-color-outline-variant);
|
|
204
|
+
transition: background-color var(--mcl-transition);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&:hover td {
|
|
208
|
+
background-color: rgba(0, 0, 0, .03);
|
|
209
|
+
|
|
210
|
+
&[routerLink], &[click] {
|
|
211
|
+
cursor: pointer;
|
|
133
212
|
}
|
|
213
|
+
}
|
|
134
214
|
|
|
215
|
+
&:last-child td {
|
|
216
|
+
border-bottom: 0;
|
|
135
217
|
}
|
|
136
218
|
}
|
|
219
|
+
}
|
|
137
220
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
221
|
+
table td.principal {
|
|
222
|
+
font-weight: 500;
|
|
223
|
+
}
|
|
142
224
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
225
|
+
/* --- Badges de status (uso livre em células/conteúdo) --- */
|
|
226
|
+
.badge {
|
|
227
|
+
display: inline-block;
|
|
228
|
+
padding: 3px 10px;
|
|
229
|
+
border-radius: 999px;
|
|
230
|
+
font-size: 11px;
|
|
231
|
+
font-weight: 600;
|
|
232
|
+
letter-spacing: .02em;
|
|
233
|
+
background: var(--lib-color-surface-container);
|
|
234
|
+
color: var(--lib-color-on-surface-variant);
|
|
235
|
+
}
|
|
236
|
+
.badge--ok, .badge--success {
|
|
237
|
+
background: #e5f2e3;
|
|
238
|
+
color: #2c6127;
|
|
239
|
+
}
|
|
240
|
+
.badge--warn, .badge--warning {
|
|
241
|
+
background: #f7ecd8;
|
|
242
|
+
color: #8a5800;
|
|
243
|
+
}
|
|
244
|
+
.badge--err, .badge--error {
|
|
245
|
+
background: #f9e3e1;
|
|
246
|
+
color: #9d2b22;
|
|
247
|
+
}
|
|
248
|
+
.badge--muted, .badge--neutral {
|
|
249
|
+
background: var(--lib-color-surface-container);
|
|
250
|
+
color: var(--lib-color-on-surface-variant);
|
|
251
|
+
}
|
|
146
252
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
253
|
+
/* --- Menus suspensos --- */
|
|
254
|
+
.mat-menu-panel {
|
|
255
|
+
border-radius: var(--mcl-radius-md);
|
|
256
|
+
border: 1px solid var(--lib-color-outline-variant);
|
|
257
|
+
box-shadow: var(--mcl-shadow-2);
|
|
258
|
+
min-width: 200px;
|
|
150
259
|
}
|
|
151
260
|
|
|
152
|
-
|
|
153
|
-
|
|
261
|
+
/* Menu do usuário logado (aberto a partir da sidebar) */
|
|
262
|
+
.mat-menu-panel.mcl-user-menu {
|
|
263
|
+
min-width: 232px;
|
|
154
264
|
}
|
|
155
265
|
|
|
156
|
-
.
|
|
157
|
-
|
|
266
|
+
.mcl-user-menu__header {
|
|
267
|
+
padding: 8px 12px 10px;
|
|
268
|
+
margin: 0 0 6px;
|
|
269
|
+
border-bottom: 1px solid var(--lib-color-outline-variant);
|
|
270
|
+
cursor: default;
|
|
158
271
|
}
|
|
159
272
|
|
|
160
|
-
.
|
|
161
|
-
|
|
273
|
+
.mcl-user-menu__name {
|
|
274
|
+
font-size: 13.5px;
|
|
275
|
+
font-weight: 600;
|
|
276
|
+
color: var(--lib-color-on-surface);
|
|
277
|
+
line-height: 1.3;
|
|
278
|
+
white-space: nowrap;
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
text-overflow: ellipsis;
|
|
162
281
|
}
|
|
163
282
|
|
|
164
|
-
.
|
|
165
|
-
|
|
283
|
+
.mcl-user-menu__role {
|
|
284
|
+
font-size: 11.5px;
|
|
285
|
+
color: var(--lib-color-on-surface-variant);
|
|
286
|
+
line-height: 1.3;
|
|
287
|
+
white-space: nowrap;
|
|
288
|
+
overflow: hidden;
|
|
289
|
+
text-overflow: ellipsis;
|
|
166
290
|
}
|
|
167
291
|
|
|
168
|
-
.
|
|
169
|
-
|
|
292
|
+
.mat-menu-panel .mat-menu-content {
|
|
293
|
+
padding: 6px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.mat-menu-panel .mat-menu-item {
|
|
297
|
+
height: 40px;
|
|
298
|
+
line-height: 40px;
|
|
299
|
+
border-radius: var(--mcl-radius-sm);
|
|
300
|
+
font-family: var(--mcl-font);
|
|
301
|
+
font-size: 14px;
|
|
302
|
+
|
|
303
|
+
.mat-icon {
|
|
304
|
+
color: var(--lib-color-on-surface-variant);
|
|
305
|
+
margin-right: 10px;
|
|
306
|
+
}
|
|
170
307
|
}
|
|
171
308
|
|
|
309
|
+
/* --- Diálogos --- */
|
|
172
310
|
.mat-dialog-container {
|
|
173
|
-
border-radius:
|
|
311
|
+
border-radius: var(--mcl-radius-lg);
|
|
312
|
+
box-shadow: var(--mcl-shadow-3);
|
|
174
313
|
padding: 0;
|
|
175
314
|
|
|
176
315
|
.mat-dialog-content {
|
|
@@ -178,55 +317,67 @@
|
|
|
178
317
|
width: 95vw;
|
|
179
318
|
min-width: auto;
|
|
180
319
|
padding: 0;
|
|
181
|
-
margin:
|
|
320
|
+
margin: 0 24px;
|
|
321
|
+
color: var(--lib-color-on-surface-variant);
|
|
182
322
|
}
|
|
183
323
|
|
|
184
324
|
.mat-dialog-title {
|
|
185
|
-
font-weight:
|
|
186
|
-
font-size:
|
|
325
|
+
font-weight: 600;
|
|
326
|
+
font-size: 18px;
|
|
187
327
|
line-height: 24px;
|
|
188
|
-
letter-spacing:
|
|
189
|
-
color:
|
|
328
|
+
letter-spacing: -.01em;
|
|
329
|
+
color: var(--lib-color-on-surface);
|
|
190
330
|
padding: 0;
|
|
191
|
-
margin:
|
|
331
|
+
margin: 24px 24px 8px;
|
|
192
332
|
}
|
|
193
333
|
|
|
194
334
|
.mat-dialog-actions {
|
|
195
335
|
padding: 0;
|
|
196
|
-
margin:
|
|
336
|
+
margin: 16px 24px 20px;
|
|
197
337
|
}
|
|
198
338
|
}
|
|
199
339
|
|
|
340
|
+
.iframe-dialog .mat-dialog-container .mat-dialog-content {
|
|
341
|
+
margin: 0;
|
|
342
|
+
}
|
|
343
|
+
|
|
200
344
|
.mat-dialog-actions, .acoes {
|
|
201
|
-
margin-top:
|
|
345
|
+
margin-top: 24px;
|
|
202
346
|
display: flex;
|
|
203
347
|
flex-direction: row-reverse;
|
|
204
|
-
gap:
|
|
348
|
+
gap: 12px;
|
|
205
349
|
|
|
206
350
|
.spacer {
|
|
207
351
|
flex: 1 1 auto;
|
|
208
352
|
}
|
|
209
353
|
}
|
|
210
354
|
|
|
211
|
-
|
|
355
|
+
/* --- Utilitários --- */
|
|
356
|
+
.text-center {
|
|
357
|
+
text-align: center
|
|
358
|
+
}
|
|
212
359
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
360
|
+
.text-right {
|
|
361
|
+
text-align: right
|
|
362
|
+
}
|
|
216
363
|
|
|
364
|
+
.text-left {
|
|
365
|
+
text-align: left
|
|
217
366
|
}
|
|
218
367
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
368
|
+
.component-loading {
|
|
369
|
+
position: relative;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
@media(max-width: 750px) {
|
|
373
|
+
.spacer {
|
|
374
|
+
flex: 1;
|
|
224
375
|
}
|
|
225
376
|
}
|
|
226
377
|
|
|
227
378
|
a, a:active {
|
|
228
|
-
color: mat-color($accent
|
|
229
|
-
transition: 300ms;
|
|
379
|
+
color: mat-color($accent);
|
|
380
|
+
transition: color 300ms;
|
|
230
381
|
text-decoration: none;
|
|
231
382
|
}
|
|
232
383
|
|
|
@@ -235,4 +386,3 @@
|
|
|
235
386
|
text-decoration: underline;
|
|
236
387
|
}
|
|
237
388
|
}
|
|
238
|
-
|