@main-class/template 1.20.5 → 1.21.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 +25 -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 +10 -4
- package/fesm2015/main-class-template.js +17 -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 +4 -1
- package/package.json +1 -1
- package/theming.scss +248 -129
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,196 @@
|
|
|
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
|
-
padding-right: 10px;
|
|
102
|
-
font-weight: bold;
|
|
103
|
-
font-size: 12px;
|
|
104
|
-
line-height: 14px;
|
|
105
|
-
letter-spacing: 0.25px;
|
|
106
|
-
text-transform: uppercase;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
td {
|
|
110
|
-
padding-left: 10px;
|
|
111
|
-
padding-right: 10px;
|
|
112
|
-
transition: 50ms;
|
|
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
|
-
}
|
|
133
|
-
}
|
|
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
|
+
}
|
|
134
200
|
|
|
201
|
+
td {
|
|
202
|
+
padding: 12px 16px;
|
|
203
|
+
border-bottom: 1px solid var(--lib-color-outline-variant);
|
|
204
|
+
transition: background-color var(--mcl-transition);
|
|
135
205
|
}
|
|
136
|
-
}
|
|
137
206
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
width: 100%;
|
|
141
|
-
}
|
|
207
|
+
&:hover td {
|
|
208
|
+
background-color: rgba(0, 0, 0, .03);
|
|
142
209
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
210
|
+
&[routerLink], &[click] {
|
|
211
|
+
cursor: pointer;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
146
214
|
|
|
147
|
-
|
|
148
|
-
|
|
215
|
+
&:last-child td {
|
|
216
|
+
border-bottom: 0;
|
|
217
|
+
}
|
|
149
218
|
}
|
|
150
219
|
}
|
|
151
220
|
|
|
152
|
-
.
|
|
153
|
-
|
|
221
|
+
table td.principal {
|
|
222
|
+
font-weight: 500;
|
|
154
223
|
}
|
|
155
224
|
|
|
156
|
-
|
|
157
|
-
|
|
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);
|
|
158
251
|
}
|
|
159
252
|
|
|
160
|
-
|
|
161
|
-
|
|
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;
|
|
162
259
|
}
|
|
163
260
|
|
|
164
|
-
.
|
|
165
|
-
|
|
261
|
+
.mat-menu-panel .mat-menu-content {
|
|
262
|
+
padding: 6px;
|
|
166
263
|
}
|
|
167
264
|
|
|
168
|
-
.
|
|
169
|
-
|
|
265
|
+
.mat-menu-panel .mat-menu-item {
|
|
266
|
+
height: 40px;
|
|
267
|
+
line-height: 40px;
|
|
268
|
+
border-radius: var(--mcl-radius-sm);
|
|
269
|
+
font-family: var(--mcl-font);
|
|
270
|
+
font-size: 14px;
|
|
271
|
+
|
|
272
|
+
.mat-icon {
|
|
273
|
+
color: var(--lib-color-on-surface-variant);
|
|
274
|
+
margin-right: 10px;
|
|
275
|
+
}
|
|
170
276
|
}
|
|
171
277
|
|
|
278
|
+
/* --- Diálogos --- */
|
|
172
279
|
.mat-dialog-container {
|
|
173
|
-
border-radius:
|
|
280
|
+
border-radius: var(--mcl-radius-lg);
|
|
281
|
+
box-shadow: var(--mcl-shadow-3);
|
|
174
282
|
padding: 0;
|
|
175
283
|
|
|
176
284
|
.mat-dialog-content {
|
|
@@ -178,55 +286,67 @@
|
|
|
178
286
|
width: 95vw;
|
|
179
287
|
min-width: auto;
|
|
180
288
|
padding: 0;
|
|
181
|
-
margin:
|
|
289
|
+
margin: 0 24px;
|
|
290
|
+
color: var(--lib-color-on-surface-variant);
|
|
182
291
|
}
|
|
183
292
|
|
|
184
293
|
.mat-dialog-title {
|
|
185
|
-
font-weight:
|
|
186
|
-
font-size:
|
|
294
|
+
font-weight: 600;
|
|
295
|
+
font-size: 18px;
|
|
187
296
|
line-height: 24px;
|
|
188
|
-
letter-spacing:
|
|
189
|
-
color:
|
|
297
|
+
letter-spacing: -.01em;
|
|
298
|
+
color: var(--lib-color-on-surface);
|
|
190
299
|
padding: 0;
|
|
191
|
-
margin:
|
|
300
|
+
margin: 24px 24px 8px;
|
|
192
301
|
}
|
|
193
302
|
|
|
194
303
|
.mat-dialog-actions {
|
|
195
304
|
padding: 0;
|
|
196
|
-
margin:
|
|
305
|
+
margin: 16px 24px 20px;
|
|
197
306
|
}
|
|
198
307
|
}
|
|
199
308
|
|
|
309
|
+
.iframe-dialog .mat-dialog-container .mat-dialog-content {
|
|
310
|
+
margin: 0;
|
|
311
|
+
}
|
|
312
|
+
|
|
200
313
|
.mat-dialog-actions, .acoes {
|
|
201
|
-
margin-top:
|
|
314
|
+
margin-top: 24px;
|
|
202
315
|
display: flex;
|
|
203
316
|
flex-direction: row-reverse;
|
|
204
|
-
gap:
|
|
317
|
+
gap: 12px;
|
|
205
318
|
|
|
206
319
|
.spacer {
|
|
207
320
|
flex: 1 1 auto;
|
|
208
321
|
}
|
|
209
322
|
}
|
|
210
323
|
|
|
211
|
-
|
|
324
|
+
/* --- Utilitários --- */
|
|
325
|
+
.text-center {
|
|
326
|
+
text-align: center
|
|
327
|
+
}
|
|
212
328
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
329
|
+
.text-right {
|
|
330
|
+
text-align: right
|
|
331
|
+
}
|
|
216
332
|
|
|
333
|
+
.text-left {
|
|
334
|
+
text-align: left
|
|
217
335
|
}
|
|
218
336
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
337
|
+
.component-loading {
|
|
338
|
+
position: relative;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
@media(max-width: 750px) {
|
|
342
|
+
.spacer {
|
|
343
|
+
flex: 1;
|
|
224
344
|
}
|
|
225
345
|
}
|
|
226
346
|
|
|
227
347
|
a, a:active {
|
|
228
|
-
color: mat-color($accent
|
|
229
|
-
transition: 300ms;
|
|
348
|
+
color: mat-color($accent);
|
|
349
|
+
transition: color 300ms;
|
|
230
350
|
text-decoration: none;
|
|
231
351
|
}
|
|
232
352
|
|
|
@@ -235,4 +355,3 @@
|
|
|
235
355
|
text-decoration: underline;
|
|
236
356
|
}
|
|
237
357
|
}
|
|
238
|
-
|