@telcomdev/ui 0.0.1 → 0.0.2
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 +95 -1
- package/fesm2022/telcomdev-ui.mjs +280 -28
- package/fesm2022/telcomdev-ui.mjs.map +1 -1
- package/package.json +5 -2
- package/types/telcomdev-ui.d.ts +165 -5
package/README.md
CHANGED
|
@@ -1,11 +1,93 @@
|
|
|
1
1
|
# Telcomdev UI
|
|
2
2
|
|
|
3
|
+
## Iconos
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { TdIcon, TdIconoRegistry } from '@telcomdev/ui';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
imports: [TdIcon],
|
|
10
|
+
})
|
|
11
|
+
export class App {
|
|
12
|
+
constructor(registry: TdIconoRegistry) {
|
|
13
|
+
registry.registrar({
|
|
14
|
+
estrella: 'M12 2 15 9 22 9 17 14 19 22 12 17 5 22 7 14 2 9 9 9Z',
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<td-icon nombre="security" tamano="24px" />
|
|
22
|
+
<td-icon nombre="estrella" titulo="Favorito" />
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
El icono hereda el color CSS mediante `currentColor`. Si el nombre no existe, se muestra
|
|
26
|
+
`folder`.
|
|
27
|
+
|
|
28
|
+
## Header
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { TdHeader } from '@telcomdev/ui';
|
|
32
|
+
|
|
33
|
+
@Component({
|
|
34
|
+
imports: [TdHeader],
|
|
35
|
+
})
|
|
36
|
+
export class App {
|
|
37
|
+
sidebarAbierto = true;
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<td-header
|
|
43
|
+
[menuAbierto]="sidebarAbierto"
|
|
44
|
+
[oscuro]="oscuro"
|
|
45
|
+
usuario="Andrea Torres"
|
|
46
|
+
cargo="Administradora"
|
|
47
|
+
[notificaciones]="notificaciones"
|
|
48
|
+
(menuToggle)="sidebarAbierto = !sidebarAbierto"
|
|
49
|
+
(notificacionSeleccionada)="abrirNotificacion($event)"
|
|
50
|
+
(verTodasNotificaciones)="verNotificaciones()"
|
|
51
|
+
(accionPerfil)="ejecutarAccionPerfil($event)"
|
|
52
|
+
>
|
|
53
|
+
<button tdHeaderActions type="button">Acción adicional</button>
|
|
54
|
+
</td-header>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
El header incluye dropdowns funcionales de notificaciones y perfil, avatar por iniciales,
|
|
58
|
+
modo responsive y tema oscuro. Las acciones `tdHeaderActions` aparecen a la derecha.
|
|
59
|
+
|
|
60
|
+
## Footer
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { TdFooter } from '@telcomdev/ui';
|
|
64
|
+
|
|
65
|
+
@Component({
|
|
66
|
+
imports: [TdFooter],
|
|
67
|
+
})
|
|
68
|
+
export class App {}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```html
|
|
72
|
+
<td-footer
|
|
73
|
+
empresa="TelcomDev"
|
|
74
|
+
texto="Todos los derechos reservados."
|
|
75
|
+
version="1.0.0"
|
|
76
|
+
[oscuro]="oscuro"
|
|
77
|
+
>
|
|
78
|
+
<a tdFooterLinks href="/privacidad">Privacidad</a>
|
|
79
|
+
<span tdFooterActions>Angular 21</span>
|
|
80
|
+
</td-footer>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
El footer calcula el año actual por defecto y admite el modo `compacto`.
|
|
84
|
+
|
|
3
85
|
## Sidebar
|
|
4
86
|
|
|
5
87
|
`TdSidebar` es standalone y no depende de Angular Material ni Tailwind.
|
|
6
88
|
|
|
7
89
|
```ts
|
|
8
|
-
import { MenuSidebar, TdSidebar } from 'telcomdev
|
|
90
|
+
import { MenuSidebar, TdSidebar } from '@telcomdev/ui';
|
|
9
91
|
|
|
10
92
|
@Component({
|
|
11
93
|
imports: [TdSidebar],
|
|
@@ -32,6 +114,7 @@ export class App {
|
|
|
32
114
|
subtitulo="Central Platform"
|
|
33
115
|
[menu]="menu"
|
|
34
116
|
[(abierto)]="abierto"
|
|
117
|
+
modoCerrado="oculto"
|
|
35
118
|
[oscuro]="oscuro"
|
|
36
119
|
[cargando]="false"
|
|
37
120
|
error=""
|
|
@@ -39,6 +122,17 @@ export class App {
|
|
|
39
122
|
/>
|
|
40
123
|
```
|
|
41
124
|
|
|
125
|
+
El botón para abrir o cerrar debe vivir en el header de la aplicación:
|
|
126
|
+
|
|
127
|
+
```html
|
|
128
|
+
<button type="button" (click)="abierto = !abierto">
|
|
129
|
+
<td-icon [nombre]="abierto ? 'close' : 'menu'" />
|
|
130
|
+
</button>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
`modoCerrado` acepta `compacto` para conservar una barra de iconos u `oculto` para cerrar
|
|
134
|
+
completamente el sidebar.
|
|
135
|
+
|
|
42
136
|
La aplicación consumidora obtiene el menú desde su propia API. El componente ordena cada
|
|
43
137
|
nivel por `orden`, usa `folder` cuando no recibe icono y renderiza los submenús
|
|
44
138
|
recursivamente.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, EventEmitter,
|
|
2
|
+
import { Component, Input, ChangeDetectionStrategy, Injectable, inject, HostBinding, EventEmitter, HostListener, Output, signal } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import { RouterLink, RouterLinkActive } from '@angular/router';
|
|
5
5
|
|
|
@@ -358,6 +358,279 @@ class TdAlerta {
|
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
+
class TdFooter {
|
|
362
|
+
empresa = 'TelcomDev';
|
|
363
|
+
texto = 'Todos los derechos reservados.';
|
|
364
|
+
version = '';
|
|
365
|
+
oscuro = false;
|
|
366
|
+
compacto = false;
|
|
367
|
+
anio = new Date().getFullYear();
|
|
368
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TdFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
369
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TdFooter, isStandalone: true, selector: "td-footer", inputs: { empresa: "empresa", texto: "texto", version: "version", oscuro: "oscuro", compacto: "compacto", anio: "anio" }, ngImport: i0, template: "<footer\n class=\"td-footer\"\n [class.td-footer--oscuro]=\"oscuro\"\n [class.td-footer--compacto]=\"compacto\"\n>\n <div class=\"td-footer__identidad\">\n <span>\u00A9 {{ anio }} {{ empresa }}</span>\n @if (texto) {\n <small>{{ texto }}</small>\n }\n </div>\n\n <nav class=\"td-footer__enlaces\" aria-label=\"Enlaces del pie de p\u00E1gina\">\n <ng-content select=\"[tdFooterLinks]\" />\n </nav>\n\n <div class=\"td-footer__final\">\n <ng-content select=\"[tdFooterActions]\" />\n @if (version) {\n <span class=\"td-footer__version\">v{{ version }}</span>\n }\n </div>\n</footer>\n", styles: [":host{display:block}*{box-sizing:border-box}.td-footer{--td-footer-fondo: #fff;--td-footer-borde: #e2e8f0;--td-footer-texto: #475569;--td-footer-suave: #94a3b8;display:grid;min-height:4.5rem;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:1rem;border-top:1px solid var(--td-footer-borde);padding:1rem 1.5rem;color:var(--td-footer-texto);background:var(--td-footer-fondo);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:.75rem}.td-footer--oscuro{--td-footer-fondo: #111116;--td-footer-borde: #29292f;--td-footer-texto: #d4d4d8;--td-footer-suave: #71717a}.td-footer--compacto{min-height:3.25rem;padding-block:.65rem}.td-footer__identidad{display:flex;min-width:0;flex-wrap:wrap;gap:.3rem .75rem;align-items:center}.td-footer__identidad span{font-weight:700}.td-footer__identidad small{color:var(--td-footer-suave);font-size:inherit}.td-footer__enlaces{display:flex;align-items:center;justify-content:center;gap:1rem}.td-footer__final{display:flex;align-items:center;justify-content:flex-end;gap:.75rem}.td-footer__version{border:1px solid var(--td-footer-borde);border-radius:999px;padding:.22rem .55rem;color:var(--td-footer-suave);font:700 .65rem/1 ui-monospace,monospace}@media(max-width:720px){.td-footer{grid-template-columns:1fr;justify-items:center;text-align:center}.td-footer__identidad,.td-footer__final{justify-content:center}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
370
|
+
}
|
|
371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TdFooter, decorators: [{
|
|
372
|
+
type: Component,
|
|
373
|
+
args: [{ selector: 'td-footer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<footer\n class=\"td-footer\"\n [class.td-footer--oscuro]=\"oscuro\"\n [class.td-footer--compacto]=\"compacto\"\n>\n <div class=\"td-footer__identidad\">\n <span>\u00A9 {{ anio }} {{ empresa }}</span>\n @if (texto) {\n <small>{{ texto }}</small>\n }\n </div>\n\n <nav class=\"td-footer__enlaces\" aria-label=\"Enlaces del pie de p\u00E1gina\">\n <ng-content select=\"[tdFooterLinks]\" />\n </nav>\n\n <div class=\"td-footer__final\">\n <ng-content select=\"[tdFooterActions]\" />\n @if (version) {\n <span class=\"td-footer__version\">v{{ version }}</span>\n }\n </div>\n</footer>\n", styles: [":host{display:block}*{box-sizing:border-box}.td-footer{--td-footer-fondo: #fff;--td-footer-borde: #e2e8f0;--td-footer-texto: #475569;--td-footer-suave: #94a3b8;display:grid;min-height:4.5rem;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:1rem;border-top:1px solid var(--td-footer-borde);padding:1rem 1.5rem;color:var(--td-footer-texto);background:var(--td-footer-fondo);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:.75rem}.td-footer--oscuro{--td-footer-fondo: #111116;--td-footer-borde: #29292f;--td-footer-texto: #d4d4d8;--td-footer-suave: #71717a}.td-footer--compacto{min-height:3.25rem;padding-block:.65rem}.td-footer__identidad{display:flex;min-width:0;flex-wrap:wrap;gap:.3rem .75rem;align-items:center}.td-footer__identidad span{font-weight:700}.td-footer__identidad small{color:var(--td-footer-suave);font-size:inherit}.td-footer__enlaces{display:flex;align-items:center;justify-content:center;gap:1rem}.td-footer__final{display:flex;align-items:center;justify-content:flex-end;gap:.75rem}.td-footer__version{border:1px solid var(--td-footer-borde);border-radius:999px;padding:.22rem .55rem;color:var(--td-footer-suave);font:700 .65rem/1 ui-monospace,monospace}@media(max-width:720px){.td-footer{grid-template-columns:1fr;justify-items:center;text-align:center}.td-footer__identidad,.td-footer__final{justify-content:center}}\n"] }]
|
|
374
|
+
}], propDecorators: { empresa: [{
|
|
375
|
+
type: Input
|
|
376
|
+
}], texto: [{
|
|
377
|
+
type: Input
|
|
378
|
+
}], version: [{
|
|
379
|
+
type: Input
|
|
380
|
+
}], oscuro: [{
|
|
381
|
+
type: Input
|
|
382
|
+
}], compacto: [{
|
|
383
|
+
type: Input
|
|
384
|
+
}], anio: [{
|
|
385
|
+
type: Input
|
|
386
|
+
}] } });
|
|
387
|
+
|
|
388
|
+
const TD_ICONOS = {
|
|
389
|
+
home: {
|
|
390
|
+
path: 'M3 10.5 12 3l9 7.5V21a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1V10.5Z',
|
|
391
|
+
},
|
|
392
|
+
dashboard: {
|
|
393
|
+
path: 'M4 3h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm10 0h6a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm0 8h6a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1ZM4 14h6a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1Z',
|
|
394
|
+
},
|
|
395
|
+
folder: {
|
|
396
|
+
path: 'M3 5a2 2 0 0 1 2-2h5l2 2h7a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Z',
|
|
397
|
+
},
|
|
398
|
+
settings: {
|
|
399
|
+
path: 'M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm8.5 3.5c0-.5-.05-.98-.14-1.45l2.02-1.57-2-3.46-2.47 1a8.7 8.7 0 0 0-2.5-1.45L15 2.5h-4l-.4 2.57a8.7 8.7 0 0 0-2.51 1.45l-2.47-1-2 3.46 2.02 1.57a7.7 7.7 0 0 0 0 2.9l-2.02 1.57 2 3.46 2.47-1a8.7 8.7 0 0 0 2.5 1.45L11 21.5h4l.4-2.57a8.7 8.7 0 0 0 2.51-1.45l2.47 1 2-3.46-2.02-1.57c.09-.47.14-.95.14-1.45Z',
|
|
400
|
+
},
|
|
401
|
+
people: {
|
|
402
|
+
path: 'M16 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM6.5 12a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM16 13c-4 0-7 2-7 4.5V21h14v-3.5C23 15 20 13 16 13ZM6.5 14C2.9 14 1 15.8 1 18v3h6v-3.5c0-1.2.48-2.28 1.3-3.16A9.3 9.3 0 0 0 6.5 14Z',
|
|
403
|
+
},
|
|
404
|
+
person: {
|
|
405
|
+
path: 'M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-5 0-9 2.5-9 5.5V22h18v-2.5c0-3-4-5.5-9-5.5Z',
|
|
406
|
+
},
|
|
407
|
+
security: {
|
|
408
|
+
path: 'M12 2 4 5v6c0 5.05 3.41 9.74 8 11 4.59-1.26 8-5.95 8-11V5l-8-3Zm-1 14-4-4 1.4-1.4 2.6 2.58 5.6-5.58L18 9l-7 7Z',
|
|
409
|
+
},
|
|
410
|
+
inventory: {
|
|
411
|
+
path: 'm12 2 9 5-9 5-9-5 9-5Zm-7 8.5 6 3.33V22l-6-3.33V10.5Zm8 11.5v-8.17l6-3.33v8.17L13 22Z',
|
|
412
|
+
},
|
|
413
|
+
shopping_cart: {
|
|
414
|
+
path: 'M7 18a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm10 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM6.2 6l.8 2h11.6l-1.9 5H8.1L4.3 3H1v2h2l3.6 9.6A2 2 0 0 0 8.5 16H19v-2H8.5l-.4-1H18a2 2 0 0 0 1.86-1.27L22 6H6.2Z',
|
|
415
|
+
},
|
|
416
|
+
receipt: {
|
|
417
|
+
path: 'M5 2v20l3-2 4 2 4-2 3 2V2l-3 2-4-2-4 2-3-2Zm3 6h8v2H8V8Zm0 4h8v2H8v-2Z',
|
|
418
|
+
},
|
|
419
|
+
assessment: {
|
|
420
|
+
path: 'M4 20h16v2H4a2 2 0 0 1-2-2V4h2v16Zm3-2H5v-6h2v6Zm4 0H9V7h2v11Zm4 0h-2V4h2v14Zm4 0h-2v-9h2v9Z',
|
|
421
|
+
},
|
|
422
|
+
description: {
|
|
423
|
+
path: 'M6 2h8l5 5v15H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm7 1.5V8h4.5L13 3.5ZM8 12v2h8v-2H8Zm0 4v2h8v-2H8Z',
|
|
424
|
+
},
|
|
425
|
+
business: {
|
|
426
|
+
path: 'M3 21V3h10v5h8v13h-7v-4h-2v4H3Zm3-14h2V5H6v2Zm4 0h2V5h-2v2Zm-4 4h2V9H6v2Zm4 0h2V9h-2v2Zm6 1h2v-2h-2v2Zm0 4h2v-2h-2v2Z',
|
|
427
|
+
},
|
|
428
|
+
chevron_left: {
|
|
429
|
+
path: 'M14.7 5.3a1 1 0 0 1 0 1.4L9.4 12l5.3 5.3a1 1 0 1 1-1.4 1.4l-6-6a1 1 0 0 1 0-1.4l6-6a1 1 0 0 1 1.4 0Z',
|
|
430
|
+
},
|
|
431
|
+
chevron_right: {
|
|
432
|
+
path: 'M9.3 5.3a1 1 0 0 0 0 1.4l5.3 5.3-5.3 5.3a1 1 0 1 0 1.4 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.4 0Z',
|
|
433
|
+
},
|
|
434
|
+
sun: {
|
|
435
|
+
path: 'M12 7a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0-5a1 1 0 0 1 1 1v2a1 1 0 1 1-2 0V3a1 1 0 0 1 1-1Zm0 17a1 1 0 0 1 1 1v2a1 1 0 1 1-2 0v-2a1 1 0 0 1 1-1ZM2 12a1 1 0 0 1 1-1h2a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1Zm17 0a1 1 0 0 1 1-1h2a1 1 0 1 1 0 2h-2a1 1 0 0 1-1-1ZM4.22 4.22a1 1 0 0 1 1.42 0l1.41 1.42a1 1 0 0 1-1.41 1.41L4.22 5.64a1 1 0 0 1 0-1.42Zm12.73 12.73a1 1 0 0 1 1.41 0l1.42 1.41a1 1 0 0 1-1.42 1.42l-1.41-1.42a1 1 0 0 1 0-1.41Zm2.83-12.73a1 1 0 0 1 0 1.42l-1.42 1.41a1 1 0 0 1-1.41-1.41l1.41-1.42a1 1 0 0 1 1.42 0ZM7.05 16.95a1 1 0 0 1 0 1.41l-1.41 1.42a1 1 0 0 1-1.42-1.42l1.42-1.41a1 1 0 0 1 1.41 0Z',
|
|
436
|
+
},
|
|
437
|
+
moon: {
|
|
438
|
+
path: 'M20.5 15.2A8.5 8.5 0 0 1 8.8 3.5 9 9 0 1 0 20.5 15.2Z',
|
|
439
|
+
},
|
|
440
|
+
alert: {
|
|
441
|
+
path: 'M12 2 1 21h22L12 2Zm-1 7h2v6h-2V9Zm0 8h2v2h-2v-2Z',
|
|
442
|
+
},
|
|
443
|
+
check: {
|
|
444
|
+
path: 'm9.2 16.2-4.4-4.4-1.6 1.6 6 6L21 7.6 19.4 6 9.2 16.2Z',
|
|
445
|
+
},
|
|
446
|
+
close: {
|
|
447
|
+
path: 'M6.4 5 12 10.6 17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4-5.6-5.6L6.4 19 5 17.6l5.6-5.6L5 6.4 6.4 5Z',
|
|
448
|
+
},
|
|
449
|
+
menu: {
|
|
450
|
+
path: 'M3 6h18v2H3V6Zm0 5h18v2H3v-2Zm0 5h18v2H3v-2Z',
|
|
451
|
+
},
|
|
452
|
+
search: {
|
|
453
|
+
path: 'M10.5 3a7.5 7.5 0 1 0 4.73 13.32L20.91 22 22 20.91l-5.68-5.68A7.5 7.5 0 0 0 10.5 3Zm0 2a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11Z',
|
|
454
|
+
},
|
|
455
|
+
notifications: {
|
|
456
|
+
path: 'M12 22a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 22Zm7-6v-5a7 7 0 0 0-5.5-6.84V3a1.5 1.5 0 0 0-3 0v1.16A7 7 0 0 0 5 11v5l-2 2v1h18v-1l-2-2Z',
|
|
457
|
+
},
|
|
458
|
+
chevron_down: {
|
|
459
|
+
path: 'M5.3 8.3a1 1 0 0 1 1.4 0l5.3 5.3 5.3-5.3a1 1 0 1 1 1.4 1.4l-6 6a1 1 0 0 1-1.4 0l-6-6a1 1 0 0 1 0-1.4Z',
|
|
460
|
+
},
|
|
461
|
+
apps: {
|
|
462
|
+
path: 'M4 3h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm12 0h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1ZM4 15h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1Zm12 0h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1Z',
|
|
463
|
+
},
|
|
464
|
+
help: {
|
|
465
|
+
path: 'M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm0-4.5a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5Zm.2-9.5c-2 0-3.37 1.03-3.7 2.75l1.95.4c.17-.84.77-1.3 1.67-1.3 1 0 1.63.52 1.63 1.35 0 .67-.33 1.03-1.27 1.58-1.12.65-1.48 1.27-1.48 2.47V14h2v-.55c0-.67.2-.94 1.12-1.5 1.18-.72 1.88-1.58 1.88-2.9C16 7.25 14.5 6 12.2 6Z',
|
|
466
|
+
},
|
|
467
|
+
};
|
|
468
|
+
const TD_ICONOS_NOMBRES = Object.freeze(Object.keys(TD_ICONOS));
|
|
469
|
+
|
|
470
|
+
class TdIconoRegistry {
|
|
471
|
+
iconos = new Map(Object.entries(TD_ICONOS));
|
|
472
|
+
registrar(iconos) {
|
|
473
|
+
for (const [nombre, definicion] of Object.entries(iconos)) {
|
|
474
|
+
const clave = this.normalizar(nombre);
|
|
475
|
+
if (!clave)
|
|
476
|
+
continue;
|
|
477
|
+
this.iconos.set(clave, typeof definicion === 'string' ? { path: definicion } : definicion);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
obtener(nombre) {
|
|
481
|
+
return this.iconos.get(this.normalizar(nombre)) ?? this.iconos.get('folder');
|
|
482
|
+
}
|
|
483
|
+
existe(nombre) {
|
|
484
|
+
return this.iconos.has(this.normalizar(nombre));
|
|
485
|
+
}
|
|
486
|
+
nombres() {
|
|
487
|
+
return [...this.iconos.keys()];
|
|
488
|
+
}
|
|
489
|
+
normalizar(nombre) {
|
|
490
|
+
return (nombre ?? '').trim().toLowerCase();
|
|
491
|
+
}
|
|
492
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TdIconoRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
493
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TdIconoRegistry, providedIn: 'root' });
|
|
494
|
+
}
|
|
495
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TdIconoRegistry, decorators: [{
|
|
496
|
+
type: Injectable,
|
|
497
|
+
args: [{ providedIn: 'root' }]
|
|
498
|
+
}] });
|
|
499
|
+
|
|
500
|
+
class TdIcon {
|
|
501
|
+
registry = inject(TdIconoRegistry);
|
|
502
|
+
nombre = 'folder';
|
|
503
|
+
titulo = '';
|
|
504
|
+
set tamano(value) {
|
|
505
|
+
this.tamanoCss = typeof value === 'number' ? `${value}px` : value;
|
|
506
|
+
}
|
|
507
|
+
tamanoCss = '1.25rem';
|
|
508
|
+
get tamanoHost() {
|
|
509
|
+
return this.tamanoCss;
|
|
510
|
+
}
|
|
511
|
+
definicion() {
|
|
512
|
+
return this.registry.obtener(this.nombre);
|
|
513
|
+
}
|
|
514
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TdIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
515
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.17", type: TdIcon, isStandalone: true, selector: "td-icon", inputs: { nombre: "nombre", titulo: "titulo", tamano: "tamano" }, host: { properties: { "style.--td-icon-size": "this.tamanoHost" } }, ngImport: i0, template: `
|
|
516
|
+
<svg
|
|
517
|
+
[attr.viewBox]="definicion().viewBox || '0 0 24 24'"
|
|
518
|
+
[attr.aria-hidden]="titulo ? null : 'true'"
|
|
519
|
+
[attr.aria-label]="titulo || null"
|
|
520
|
+
[attr.role]="titulo ? 'img' : null"
|
|
521
|
+
focusable="false"
|
|
522
|
+
>
|
|
523
|
+
<path [attr.d]="definicion().path" />
|
|
524
|
+
</svg>
|
|
525
|
+
`, isInline: true, styles: [":host{display:inline-flex;width:var(--td-icon-size, 1.25rem);height:var(--td-icon-size, 1.25rem);flex:0 0 auto;color:inherit;line-height:0;vertical-align:middle}svg{width:100%;height:100%;fill:currentColor}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
526
|
+
}
|
|
527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TdIcon, decorators: [{
|
|
528
|
+
type: Component,
|
|
529
|
+
args: [{ selector: 'td-icon', template: `
|
|
530
|
+
<svg
|
|
531
|
+
[attr.viewBox]="definicion().viewBox || '0 0 24 24'"
|
|
532
|
+
[attr.aria-hidden]="titulo ? null : 'true'"
|
|
533
|
+
[attr.aria-label]="titulo || null"
|
|
534
|
+
[attr.role]="titulo ? 'img' : null"
|
|
535
|
+
focusable="false"
|
|
536
|
+
>
|
|
537
|
+
<path [attr.d]="definicion().path" />
|
|
538
|
+
</svg>
|
|
539
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:inline-flex;width:var(--td-icon-size, 1.25rem);height:var(--td-icon-size, 1.25rem);flex:0 0 auto;color:inherit;line-height:0;vertical-align:middle}svg{width:100%;height:100%;fill:currentColor}\n"] }]
|
|
540
|
+
}], propDecorators: { nombre: [{
|
|
541
|
+
type: Input
|
|
542
|
+
}], titulo: [{
|
|
543
|
+
type: Input
|
|
544
|
+
}], tamano: [{
|
|
545
|
+
type: Input
|
|
546
|
+
}], tamanoHost: [{
|
|
547
|
+
type: HostBinding,
|
|
548
|
+
args: ['style.--td-icon-size']
|
|
549
|
+
}] } });
|
|
550
|
+
|
|
551
|
+
class TdHeader {
|
|
552
|
+
menuAbierto = true;
|
|
553
|
+
mostrarMenu = true;
|
|
554
|
+
usuario = '';
|
|
555
|
+
cargo = '';
|
|
556
|
+
avatarUrl = '';
|
|
557
|
+
notificaciones = [];
|
|
558
|
+
oscuro = false;
|
|
559
|
+
fijo = true;
|
|
560
|
+
menuToggle = new EventEmitter();
|
|
561
|
+
notificacionSeleccionada = new EventEmitter();
|
|
562
|
+
verTodasNotificaciones = new EventEmitter();
|
|
563
|
+
accionPerfil = new EventEmitter();
|
|
564
|
+
panelNotificacionesAbierto = false;
|
|
565
|
+
panelPerfilAbierto = false;
|
|
566
|
+
alternarMenu() {
|
|
567
|
+
this.menuToggle.emit();
|
|
568
|
+
}
|
|
569
|
+
alternarNotificaciones() {
|
|
570
|
+
this.panelNotificacionesAbierto = !this.panelNotificacionesAbierto;
|
|
571
|
+
this.panelPerfilAbierto = false;
|
|
572
|
+
}
|
|
573
|
+
alternarPerfil() {
|
|
574
|
+
this.panelPerfilAbierto = !this.panelPerfilAbierto;
|
|
575
|
+
this.panelNotificacionesAbierto = false;
|
|
576
|
+
}
|
|
577
|
+
seleccionarNotificacion(notificacion) {
|
|
578
|
+
this.notificacionSeleccionada.emit(notificacion);
|
|
579
|
+
this.panelNotificacionesAbierto = false;
|
|
580
|
+
}
|
|
581
|
+
emitirAccionPerfil(accion) {
|
|
582
|
+
this.accionPerfil.emit(accion);
|
|
583
|
+
this.panelPerfilAbierto = false;
|
|
584
|
+
}
|
|
585
|
+
notificacionesNoLeidas() {
|
|
586
|
+
return this.notificaciones.filter((item) => !item.leida).length;
|
|
587
|
+
}
|
|
588
|
+
inicialesUsuario() {
|
|
589
|
+
const partes = this.usuario.trim().split(/\s+/).filter(Boolean);
|
|
590
|
+
return (partes
|
|
591
|
+
.slice(0, 2)
|
|
592
|
+
.map((parte) => parte.charAt(0))
|
|
593
|
+
.join('') || 'U').toUpperCase();
|
|
594
|
+
}
|
|
595
|
+
cerrarConEscape() {
|
|
596
|
+
this.panelNotificacionesAbierto = false;
|
|
597
|
+
this.panelPerfilAbierto = false;
|
|
598
|
+
}
|
|
599
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TdHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
600
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TdHeader, isStandalone: true, selector: "td-header", inputs: { menuAbierto: "menuAbierto", mostrarMenu: "mostrarMenu", usuario: "usuario", cargo: "cargo", avatarUrl: "avatarUrl", notificaciones: "notificaciones", oscuro: "oscuro", fijo: "fijo" }, outputs: { menuToggle: "menuToggle", notificacionSeleccionada: "notificacionSeleccionada", verTodasNotificaciones: "verTodasNotificaciones", accionPerfil: "accionPerfil" }, host: { listeners: { "document:keydown.escape": "cerrarConEscape()" } }, ngImport: i0, template: "<header\n class=\"td-header\"\n [class.td-header--oscuro]=\"oscuro\"\n [class.td-header--fijo]=\"fijo\"\n>\n <div class=\"td-header__inicio\">\n @if (mostrarMenu) {\n <button\n class=\"td-header__boton td-header__menu\"\n type=\"button\"\n [attr.aria-label]=\"menuAbierto ? 'Cerrar sidebar' : 'Abrir sidebar'\"\n [attr.aria-expanded]=\"menuAbierto\"\n (click)=\"alternarMenu()\"\n >\n <td-icon [nombre]=\"menuAbierto ? 'close' : 'menu'\" />\n </button>\n }\n\n <ng-content select=\"[tdHeaderStart]\" />\n </div>\n\n <div class=\"td-header__centro\">\n <ng-content select=\"[tdHeaderCenter]\" />\n </div>\n\n <div class=\"td-header__acciones\">\n <ng-content select=\"[tdHeaderActions]\" />\n\n <div class=\"td-header__desplegable\">\n <button\n class=\"td-header__boton td-header__notificaciones\"\n type=\"button\"\n aria-label=\"Notificaciones\"\n [attr.aria-expanded]=\"panelNotificacionesAbierto\"\n (click)=\"alternarNotificaciones()\"\n >\n <td-icon nombre=\"notifications\" />\n @if (notificacionesNoLeidas() > 0) {\n <span>{{ notificacionesNoLeidas() > 99 ? '99+' : notificacionesNoLeidas() }}</span>\n }\n </button>\n\n @if (panelNotificacionesAbierto) {\n <section class=\"td-header__panel td-header__panel--notificaciones\">\n <header>\n <div>\n <strong>Notificaciones</strong>\n <small>{{ notificacionesNoLeidas() }} sin leer</small>\n </div>\n <td-icon nombre=\"notifications\" />\n </header>\n\n <div class=\"td-header__lista-notificaciones\">\n @for (notificacion of notificaciones; track notificacion.id) {\n <button\n type=\"button\"\n [class.td-header__notificacion--nueva]=\"!notificacion.leida\"\n (click)=\"seleccionarNotificacion(notificacion)\"\n >\n <span class=\"td-header__notificacion-icono\">\n <td-icon [nombre]=\"notificacion.icono || 'notifications'\" />\n </span>\n <span>\n <strong>{{ notificacion.titulo }}</strong>\n @if (notificacion.descripcion) {\n <small>{{ notificacion.descripcion }}</small>\n }\n @if (notificacion.fecha) {\n <time>{{ notificacion.fecha }}</time>\n }\n </span>\n </button>\n } @empty {\n <p class=\"td-header__vacio\">No tienes notificaciones.</p>\n }\n </div>\n\n @if (notificaciones.length) {\n <button\n class=\"td-header__ver-todas\"\n type=\"button\"\n (click)=\"verTodasNotificaciones.emit(); panelNotificacionesAbierto = false\"\n >\n Ver todas las notificaciones\n </button>\n }\n </section>\n }\n </div>\n\n @if (usuario) {\n <span class=\"td-header__separador\" aria-hidden=\"true\"></span>\n\n <div class=\"td-header__desplegable\">\n <button\n class=\"td-header__perfil\"\n type=\"button\"\n aria-label=\"Abrir perfil de usuario\"\n [attr.aria-expanded]=\"panelPerfilAbierto\"\n (click)=\"alternarPerfil()\"\n >\n <span class=\"td-header__avatar\">\n @if (avatarUrl) {\n <img [src]=\"avatarUrl\" [alt]=\"usuario\" />\n } @else {\n {{ inicialesUsuario() }}\n }\n </span>\n <span class=\"td-header__usuario\">\n <strong>{{ usuario }}</strong>\n @if (cargo) {\n <small>{{ cargo }}</small>\n }\n </span>\n <td-icon nombre=\"chevron_down\" tamano=\"0.85rem\" />\n </button>\n\n @if (panelPerfilAbierto) {\n <section class=\"td-header__panel td-header__panel--perfil\">\n <div class=\"td-header__perfil-resumen\">\n <span class=\"td-header__avatar td-header__avatar--grande\">{{ inicialesUsuario() }}</span>\n <div>\n <strong>{{ usuario }}</strong>\n <small>{{ cargo || 'Usuario' }}</small>\n </div>\n </div>\n <div class=\"td-header__perfil-opciones\">\n <button type=\"button\" (click)=\"emitirAccionPerfil('perfil')\">\n <td-icon nombre=\"person\" /> Mi perfil\n </button>\n <button type=\"button\" (click)=\"emitirAccionPerfil('configuracion')\">\n <td-icon nombre=\"settings\" /> Configuraci\u00F3n\n </button>\n <button class=\"td-header__salir\" type=\"button\" (click)=\"emitirAccionPerfil('salir')\">\n <td-icon nombre=\"close\" /> Cerrar sesi\u00F3n\n </button>\n </div>\n </section>\n }\n </div>\n }\n </div>\n</header>\n", styles: [":host{display:block}*{box-sizing:border-box}.td-header{--fondo: rgba(255, 255, 255, .92);--borde: #e5e9f1;--texto: #172036;--suave: #7b8498;--hover: #f3f5fa;--acento: #5746d8;position:relative;z-index:30;display:grid;min-height:4.25rem;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;border-bottom:1px solid var(--borde);padding:.65rem 1.25rem;color:var(--texto);background:var(--fondo);box-shadow:0 8px 30px #232a440d;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);font-family:Inter,ui-sans-serif,system-ui,sans-serif}.td-header--fijo{position:sticky;top:0}.td-header--oscuro{--fondo: rgba(18, 18, 24, .94);--borde: #2b2c35;--texto: #f5f5f6;--suave: #92929f;--hover: #272730;--acento: #a89cf7}.td-header__inicio,.td-header__acciones{display:flex;min-width:0;align-items:center;gap:.5rem}.td-header__acciones{justify-content:flex-end}.td-header__centro{min-width:0}.td-header__boton{position:relative;display:grid;width:2.55rem;height:2.55rem;place-items:center;border:1px solid transparent;border-radius:.75rem;padding:0;color:var(--suave);background:transparent;cursor:pointer}.td-header__boton:hover,.td-header__perfil:hover,.td-header__menu{border-color:var(--borde);color:var(--acento);background:var(--hover)}.td-header__notificaciones>span{position:absolute;top:-.05rem;right:-.12rem;display:grid;min-width:1.05rem;height:1.05rem;place-items:center;border:2px solid var(--fondo);border-radius:999px;padding:0 .15rem;color:#fff;background:#ef4444;font-size:.5rem;font-weight:800}.td-header__separador{width:1px;height:1.75rem;margin:0 .2rem;background:var(--borde)}.td-header__desplegable{position:relative}.td-header__perfil{display:flex;align-items:center;gap:.55rem;border:1px solid transparent;border-radius:.8rem;padding:.28rem .42rem;color:var(--texto);background:transparent;font:inherit;text-align:left;cursor:pointer}.td-header__avatar{display:grid;width:2.15rem;height:2.15rem;flex:0 0 2.15rem;place-items:center;overflow:hidden;border:2px solid color-mix(in srgb,var(--acento) 18%,var(--borde));border-radius:.7rem;color:var(--acento);background:color-mix(in srgb,var(--acento) 10%,var(--hover));font-size:.68rem;font-weight:850}.td-header__avatar img{width:100%;height:100%;object-fit:cover}.td-header__avatar--grande{width:2.8rem;height:2.8rem;flex-basis:2.8rem}.td-header__usuario{display:grid;max-width:9rem;gap:.05rem}.td-header__usuario strong,.td-header__usuario small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.td-header__usuario strong{font-size:.75rem}.td-header__usuario small{color:var(--suave);font-size:.66rem}.td-header__panel{position:absolute;top:calc(100% + .75rem);right:0;width:min(22rem,100vw - 1.5rem);overflow:hidden;border:1px solid var(--borde);border-radius:1rem;color:var(--texto);background:var(--fondo);box-shadow:0 22px 55px #0f172a2e;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);animation:td-header-panel .14s ease-out}.td-header__panel>header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--borde);padding:1rem;color:var(--acento)}.td-header__panel>header div,.td-header__perfil-resumen div{display:grid;gap:.15rem}.td-header__panel>header strong,.td-header__perfil-resumen strong{color:var(--texto);font-size:.82rem}.td-header__panel>header small,.td-header__perfil-resumen small{color:var(--suave);font-size:.68rem}.td-header__lista-notificaciones{max-height:22rem;overflow-y:auto}.td-header__lista-notificaciones>button{position:relative;display:flex;width:100%;gap:.75rem;border:0;border-bottom:1px solid var(--borde);padding:.85rem 1rem;color:var(--texto);background:transparent;font:inherit;text-align:left;cursor:pointer}.td-header__lista-notificaciones>button:hover{background:var(--hover)}.td-header__notificacion--nueva:after{position:absolute;top:1rem;right:.8rem;width:.4rem;height:.4rem;border-radius:50%;background:var(--acento);content:\"\"}.td-header__notificacion-icono{display:grid;width:2.2rem;height:2.2rem;flex:0 0 2.2rem;place-items:center;border-radius:.65rem;color:var(--acento);background:color-mix(in srgb,var(--acento) 10%,transparent)}.td-header__lista-notificaciones button>span:last-child{display:grid;min-width:0;gap:.18rem;padding-right:.7rem}.td-header__lista-notificaciones strong{font-size:.75rem}.td-header__lista-notificaciones small{color:var(--suave);font-size:.68rem;line-height:1.4}.td-header__lista-notificaciones time{color:var(--acento);font-size:.61rem}.td-header__ver-todas{width:100%;border:0;padding:.8rem;color:var(--acento);background:transparent;font:750 .7rem/1 inherit;cursor:pointer}.td-header__ver-todas:hover{background:var(--hover)}.td-header__vacio{margin:0;padding:2rem 1rem;color:var(--suave);font-size:.75rem;text-align:center}.td-header__panel--perfil{width:17rem}.td-header__perfil-resumen{display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--borde);padding:1rem}.td-header__perfil-opciones{padding:.45rem}.td-header__perfil-opciones button{display:flex;width:100%;align-items:center;gap:.65rem;border:0;border-radius:.55rem;padding:.65rem .7rem;color:var(--texto);background:transparent;font:600 .72rem/1 inherit;cursor:pointer}.td-header__perfil-opciones button:hover{background:var(--hover)}.td-header__perfil-opciones .td-header__salir{color:#dc2626}@keyframes td-header-panel{0%{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@media(max-width:640px){.td-header{grid-template-columns:1fr auto;padding-inline:.75rem}.td-header__centro,.td-header__usuario,.td-header__separador{display:none}.td-header__panel{position:fixed;top:4.5rem;right:.75rem}}\n"], dependencies: [{ kind: "component", type: TdIcon, selector: "td-icon", inputs: ["nombre", "titulo", "tamano"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
601
|
+
}
|
|
602
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TdHeader, decorators: [{
|
|
603
|
+
type: Component,
|
|
604
|
+
args: [{ selector: 'td-header', imports: [TdIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<header\n class=\"td-header\"\n [class.td-header--oscuro]=\"oscuro\"\n [class.td-header--fijo]=\"fijo\"\n>\n <div class=\"td-header__inicio\">\n @if (mostrarMenu) {\n <button\n class=\"td-header__boton td-header__menu\"\n type=\"button\"\n [attr.aria-label]=\"menuAbierto ? 'Cerrar sidebar' : 'Abrir sidebar'\"\n [attr.aria-expanded]=\"menuAbierto\"\n (click)=\"alternarMenu()\"\n >\n <td-icon [nombre]=\"menuAbierto ? 'close' : 'menu'\" />\n </button>\n }\n\n <ng-content select=\"[tdHeaderStart]\" />\n </div>\n\n <div class=\"td-header__centro\">\n <ng-content select=\"[tdHeaderCenter]\" />\n </div>\n\n <div class=\"td-header__acciones\">\n <ng-content select=\"[tdHeaderActions]\" />\n\n <div class=\"td-header__desplegable\">\n <button\n class=\"td-header__boton td-header__notificaciones\"\n type=\"button\"\n aria-label=\"Notificaciones\"\n [attr.aria-expanded]=\"panelNotificacionesAbierto\"\n (click)=\"alternarNotificaciones()\"\n >\n <td-icon nombre=\"notifications\" />\n @if (notificacionesNoLeidas() > 0) {\n <span>{{ notificacionesNoLeidas() > 99 ? '99+' : notificacionesNoLeidas() }}</span>\n }\n </button>\n\n @if (panelNotificacionesAbierto) {\n <section class=\"td-header__panel td-header__panel--notificaciones\">\n <header>\n <div>\n <strong>Notificaciones</strong>\n <small>{{ notificacionesNoLeidas() }} sin leer</small>\n </div>\n <td-icon nombre=\"notifications\" />\n </header>\n\n <div class=\"td-header__lista-notificaciones\">\n @for (notificacion of notificaciones; track notificacion.id) {\n <button\n type=\"button\"\n [class.td-header__notificacion--nueva]=\"!notificacion.leida\"\n (click)=\"seleccionarNotificacion(notificacion)\"\n >\n <span class=\"td-header__notificacion-icono\">\n <td-icon [nombre]=\"notificacion.icono || 'notifications'\" />\n </span>\n <span>\n <strong>{{ notificacion.titulo }}</strong>\n @if (notificacion.descripcion) {\n <small>{{ notificacion.descripcion }}</small>\n }\n @if (notificacion.fecha) {\n <time>{{ notificacion.fecha }}</time>\n }\n </span>\n </button>\n } @empty {\n <p class=\"td-header__vacio\">No tienes notificaciones.</p>\n }\n </div>\n\n @if (notificaciones.length) {\n <button\n class=\"td-header__ver-todas\"\n type=\"button\"\n (click)=\"verTodasNotificaciones.emit(); panelNotificacionesAbierto = false\"\n >\n Ver todas las notificaciones\n </button>\n }\n </section>\n }\n </div>\n\n @if (usuario) {\n <span class=\"td-header__separador\" aria-hidden=\"true\"></span>\n\n <div class=\"td-header__desplegable\">\n <button\n class=\"td-header__perfil\"\n type=\"button\"\n aria-label=\"Abrir perfil de usuario\"\n [attr.aria-expanded]=\"panelPerfilAbierto\"\n (click)=\"alternarPerfil()\"\n >\n <span class=\"td-header__avatar\">\n @if (avatarUrl) {\n <img [src]=\"avatarUrl\" [alt]=\"usuario\" />\n } @else {\n {{ inicialesUsuario() }}\n }\n </span>\n <span class=\"td-header__usuario\">\n <strong>{{ usuario }}</strong>\n @if (cargo) {\n <small>{{ cargo }}</small>\n }\n </span>\n <td-icon nombre=\"chevron_down\" tamano=\"0.85rem\" />\n </button>\n\n @if (panelPerfilAbierto) {\n <section class=\"td-header__panel td-header__panel--perfil\">\n <div class=\"td-header__perfil-resumen\">\n <span class=\"td-header__avatar td-header__avatar--grande\">{{ inicialesUsuario() }}</span>\n <div>\n <strong>{{ usuario }}</strong>\n <small>{{ cargo || 'Usuario' }}</small>\n </div>\n </div>\n <div class=\"td-header__perfil-opciones\">\n <button type=\"button\" (click)=\"emitirAccionPerfil('perfil')\">\n <td-icon nombre=\"person\" /> Mi perfil\n </button>\n <button type=\"button\" (click)=\"emitirAccionPerfil('configuracion')\">\n <td-icon nombre=\"settings\" /> Configuraci\u00F3n\n </button>\n <button class=\"td-header__salir\" type=\"button\" (click)=\"emitirAccionPerfil('salir')\">\n <td-icon nombre=\"close\" /> Cerrar sesi\u00F3n\n </button>\n </div>\n </section>\n }\n </div>\n }\n </div>\n</header>\n", styles: [":host{display:block}*{box-sizing:border-box}.td-header{--fondo: rgba(255, 255, 255, .92);--borde: #e5e9f1;--texto: #172036;--suave: #7b8498;--hover: #f3f5fa;--acento: #5746d8;position:relative;z-index:30;display:grid;min-height:4.25rem;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;border-bottom:1px solid var(--borde);padding:.65rem 1.25rem;color:var(--texto);background:var(--fondo);box-shadow:0 8px 30px #232a440d;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);font-family:Inter,ui-sans-serif,system-ui,sans-serif}.td-header--fijo{position:sticky;top:0}.td-header--oscuro{--fondo: rgba(18, 18, 24, .94);--borde: #2b2c35;--texto: #f5f5f6;--suave: #92929f;--hover: #272730;--acento: #a89cf7}.td-header__inicio,.td-header__acciones{display:flex;min-width:0;align-items:center;gap:.5rem}.td-header__acciones{justify-content:flex-end}.td-header__centro{min-width:0}.td-header__boton{position:relative;display:grid;width:2.55rem;height:2.55rem;place-items:center;border:1px solid transparent;border-radius:.75rem;padding:0;color:var(--suave);background:transparent;cursor:pointer}.td-header__boton:hover,.td-header__perfil:hover,.td-header__menu{border-color:var(--borde);color:var(--acento);background:var(--hover)}.td-header__notificaciones>span{position:absolute;top:-.05rem;right:-.12rem;display:grid;min-width:1.05rem;height:1.05rem;place-items:center;border:2px solid var(--fondo);border-radius:999px;padding:0 .15rem;color:#fff;background:#ef4444;font-size:.5rem;font-weight:800}.td-header__separador{width:1px;height:1.75rem;margin:0 .2rem;background:var(--borde)}.td-header__desplegable{position:relative}.td-header__perfil{display:flex;align-items:center;gap:.55rem;border:1px solid transparent;border-radius:.8rem;padding:.28rem .42rem;color:var(--texto);background:transparent;font:inherit;text-align:left;cursor:pointer}.td-header__avatar{display:grid;width:2.15rem;height:2.15rem;flex:0 0 2.15rem;place-items:center;overflow:hidden;border:2px solid color-mix(in srgb,var(--acento) 18%,var(--borde));border-radius:.7rem;color:var(--acento);background:color-mix(in srgb,var(--acento) 10%,var(--hover));font-size:.68rem;font-weight:850}.td-header__avatar img{width:100%;height:100%;object-fit:cover}.td-header__avatar--grande{width:2.8rem;height:2.8rem;flex-basis:2.8rem}.td-header__usuario{display:grid;max-width:9rem;gap:.05rem}.td-header__usuario strong,.td-header__usuario small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.td-header__usuario strong{font-size:.75rem}.td-header__usuario small{color:var(--suave);font-size:.66rem}.td-header__panel{position:absolute;top:calc(100% + .75rem);right:0;width:min(22rem,100vw - 1.5rem);overflow:hidden;border:1px solid var(--borde);border-radius:1rem;color:var(--texto);background:var(--fondo);box-shadow:0 22px 55px #0f172a2e;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);animation:td-header-panel .14s ease-out}.td-header__panel>header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--borde);padding:1rem;color:var(--acento)}.td-header__panel>header div,.td-header__perfil-resumen div{display:grid;gap:.15rem}.td-header__panel>header strong,.td-header__perfil-resumen strong{color:var(--texto);font-size:.82rem}.td-header__panel>header small,.td-header__perfil-resumen small{color:var(--suave);font-size:.68rem}.td-header__lista-notificaciones{max-height:22rem;overflow-y:auto}.td-header__lista-notificaciones>button{position:relative;display:flex;width:100%;gap:.75rem;border:0;border-bottom:1px solid var(--borde);padding:.85rem 1rem;color:var(--texto);background:transparent;font:inherit;text-align:left;cursor:pointer}.td-header__lista-notificaciones>button:hover{background:var(--hover)}.td-header__notificacion--nueva:after{position:absolute;top:1rem;right:.8rem;width:.4rem;height:.4rem;border-radius:50%;background:var(--acento);content:\"\"}.td-header__notificacion-icono{display:grid;width:2.2rem;height:2.2rem;flex:0 0 2.2rem;place-items:center;border-radius:.65rem;color:var(--acento);background:color-mix(in srgb,var(--acento) 10%,transparent)}.td-header__lista-notificaciones button>span:last-child{display:grid;min-width:0;gap:.18rem;padding-right:.7rem}.td-header__lista-notificaciones strong{font-size:.75rem}.td-header__lista-notificaciones small{color:var(--suave);font-size:.68rem;line-height:1.4}.td-header__lista-notificaciones time{color:var(--acento);font-size:.61rem}.td-header__ver-todas{width:100%;border:0;padding:.8rem;color:var(--acento);background:transparent;font:750 .7rem/1 inherit;cursor:pointer}.td-header__ver-todas:hover{background:var(--hover)}.td-header__vacio{margin:0;padding:2rem 1rem;color:var(--suave);font-size:.75rem;text-align:center}.td-header__panel--perfil{width:17rem}.td-header__perfil-resumen{display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--borde);padding:1rem}.td-header__perfil-opciones{padding:.45rem}.td-header__perfil-opciones button{display:flex;width:100%;align-items:center;gap:.65rem;border:0;border-radius:.55rem;padding:.65rem .7rem;color:var(--texto);background:transparent;font:600 .72rem/1 inherit;cursor:pointer}.td-header__perfil-opciones button:hover{background:var(--hover)}.td-header__perfil-opciones .td-header__salir{color:#dc2626}@keyframes td-header-panel{0%{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@media(max-width:640px){.td-header{grid-template-columns:1fr auto;padding-inline:.75rem}.td-header__centro,.td-header__usuario,.td-header__separador{display:none}.td-header__panel{position:fixed;top:4.5rem;right:.75rem}}\n"] }]
|
|
605
|
+
}], propDecorators: { menuAbierto: [{
|
|
606
|
+
type: Input
|
|
607
|
+
}], mostrarMenu: [{
|
|
608
|
+
type: Input
|
|
609
|
+
}], usuario: [{
|
|
610
|
+
type: Input
|
|
611
|
+
}], cargo: [{
|
|
612
|
+
type: Input
|
|
613
|
+
}], avatarUrl: [{
|
|
614
|
+
type: Input
|
|
615
|
+
}], notificaciones: [{
|
|
616
|
+
type: Input
|
|
617
|
+
}], oscuro: [{
|
|
618
|
+
type: Input
|
|
619
|
+
}], fijo: [{
|
|
620
|
+
type: Input
|
|
621
|
+
}], menuToggle: [{
|
|
622
|
+
type: Output
|
|
623
|
+
}], notificacionSeleccionada: [{
|
|
624
|
+
type: Output
|
|
625
|
+
}], verTodasNotificaciones: [{
|
|
626
|
+
type: Output
|
|
627
|
+
}], accionPerfil: [{
|
|
628
|
+
type: Output
|
|
629
|
+
}], cerrarConEscape: [{
|
|
630
|
+
type: HostListener,
|
|
631
|
+
args: ['document:keydown.escape']
|
|
632
|
+
}] } });
|
|
633
|
+
|
|
361
634
|
class TdSidebar {
|
|
362
635
|
titulo = 'Gestión Corporativa';
|
|
363
636
|
subtitulo = 'Central Platform';
|
|
@@ -369,6 +642,7 @@ class TdSidebar {
|
|
|
369
642
|
error = '';
|
|
370
643
|
cargando = false;
|
|
371
644
|
oscuro = false;
|
|
645
|
+
modoCerrado = 'compacto';
|
|
372
646
|
set abierto(value) {
|
|
373
647
|
this.abiertoInterno.set(value);
|
|
374
648
|
}
|
|
@@ -386,11 +660,6 @@ class TdSidebar {
|
|
|
386
660
|
abiertoInterno = signal(true, ...(ngDevMode ? [{ debugName: "abiertoInterno" }] : /* istanbul ignore next */ []));
|
|
387
661
|
menuNormalizado = signal([], ...(ngDevMode ? [{ debugName: "menuNormalizado" }] : /* istanbul ignore next */ []));
|
|
388
662
|
expandidos = signal(new Set(), ...(ngDevMode ? [{ debugName: "expandidos" }] : /* istanbul ignore next */ []));
|
|
389
|
-
alternarSidebar() {
|
|
390
|
-
const siguiente = !this.abiertoInterno();
|
|
391
|
-
this.abiertoInterno.set(siguiente);
|
|
392
|
-
this.abiertoChange.emit(siguiente);
|
|
393
|
-
}
|
|
394
663
|
alternarGrupo(clave) {
|
|
395
664
|
if (!this.abiertoInterno()) {
|
|
396
665
|
this.abiertoInterno.set(true);
|
|
@@ -414,10 +683,6 @@ class TdSidebar {
|
|
|
414
683
|
inicialMarca() {
|
|
415
684
|
return (this.titulo.trim().charAt(0) || 'T').toUpperCase();
|
|
416
685
|
}
|
|
417
|
-
iconoPath(icono) {
|
|
418
|
-
const nombre = (icono ?? '').trim().toLowerCase();
|
|
419
|
-
return ICONOS[nombre] ?? ICONOS['folder'];
|
|
420
|
-
}
|
|
421
686
|
normalizarMenu(items) {
|
|
422
687
|
return [...items]
|
|
423
688
|
.sort((a, b) => a.orden - b.orden)
|
|
@@ -428,11 +693,11 @@ class TdSidebar {
|
|
|
428
693
|
}));
|
|
429
694
|
}
|
|
430
695
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TdSidebar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
431
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TdSidebar, isStandalone: true, selector: "td-sidebar", inputs: { titulo: "titulo", subtitulo: "subtitulo", etiquetaNavegacion: "etiquetaNavegacion", logoUrl: "logoUrl", logoAlt: "logoAlt", textoCarga: "textoCarga", mensajeVacio: "mensajeVacio", error: "error", cargando: "cargando", oscuro: "oscuro", abierto: "abierto", menu: "menu" }, outputs: { abiertoChange: "abiertoChange", seleccionar: "seleccionar" }, ngImport: i0, template: "<aside
|
|
696
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TdSidebar, isStandalone: true, selector: "td-sidebar", inputs: { titulo: "titulo", subtitulo: "subtitulo", etiquetaNavegacion: "etiquetaNavegacion", logoUrl: "logoUrl", logoAlt: "logoAlt", textoCarga: "textoCarga", mensajeVacio: "mensajeVacio", error: "error", cargando: "cargando", oscuro: "oscuro", modoCerrado: "modoCerrado", abierto: "abierto", menu: "menu" }, outputs: { abiertoChange: "abiertoChange", seleccionar: "seleccionar" }, ngImport: i0, template: "<aside\n class=\"td-sidebar\"\n [class.td-sidebar--compacto]=\"!abiertoInterno() && modoCerrado === 'compacto'\"\n [class.td-sidebar--oculto]=\"!abiertoInterno() && modoCerrado === 'oculto'\"\n [class.td-sidebar--oscuro]=\"oscuro\"\n [attr.aria-hidden]=\"!abiertoInterno() && modoCerrado === 'oculto'\"\n>\n <header class=\"td-sidebar__marca\">\n <div class=\"td-sidebar__logo\">\n @if (logoUrl) {\n <img [src]=\"logoUrl\" [alt]=\"logoAlt\" />\n } @else {\n <span>{{ inicialMarca() }}</span>\n }\n </div>\n\n @if (abiertoInterno()) {\n <div class=\"td-sidebar__marca-texto\">\n <small>{{ subtitulo }}</small>\n <strong>{{ titulo }}</strong>\n </div>\n }\n\n </header>\n\n <div class=\"td-sidebar__encabezado\">\n @if (abiertoInterno()) {\n <span>{{ etiquetaNavegacion }}</span>\n } @else {\n <span aria-hidden=\"true\">\u2022\u2022\u2022</span>\n }\n </div>\n\n <nav class=\"td-sidebar__nav\" aria-label=\"Men\u00FA principal\">\n @if (cargando) {\n <p class=\"td-sidebar__estado\">{{ textoCarga }}</p>\n } @else if (error) {\n <p class=\"td-sidebar__estado td-sidebar__estado--error\">{{ error }}</p>\n } @else if (!menuNormalizado().length) {\n <p class=\"td-sidebar__estado\">{{ mensajeVacio }}</p>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"listaMenu\"\n [ngTemplateOutletContext]=\"{ items: menuNormalizado(), nivel: 0, padre: 'raiz' }\"\n />\n }\n </nav>\n</aside>\n\n<ng-template #listaMenu let-items=\"items\" let-nivel=\"nivel\" let-padre=\"padre\">\n <ul class=\"td-sidebar__lista\" [class.td-sidebar__lista--anidada]=\"nivel > 0\">\n @for (item of items; track item) {\n @let clave = claveItem(item, padre, $index);\n @let tieneHijos = item.subMenus.length > 0;\n\n <li class=\"td-sidebar__item\">\n @if (tieneHijos) {\n <button\n class=\"td-sidebar__enlace\"\n type=\"button\"\n [class.td-sidebar__enlace--activo]=\"estaExpandido(clave)\"\n [attr.aria-expanded]=\"estaExpandido(clave)\"\n [attr.title]=\"!abiertoInterno() ? item.nombre : null\"\n (click)=\"alternarGrupo(clave)\"\n >\n <td-icon class=\"td-sidebar__icono\" [nombre]=\"item.icono || 'folder'\" />\n @if (abiertoInterno()) {\n <span>{{ item.nombre }}</span>\n <td-icon\n class=\"td-sidebar__flecha\"\n [class.td-sidebar__flecha--abierta]=\"estaExpandido(clave)\"\n nombre=\"chevron_right\"\n />\n }\n </button>\n } @else {\n <a\n class=\"td-sidebar__enlace\"\n [routerLink]=\"item.ruta || '/'\"\n routerLinkActive=\"td-sidebar__enlace--ruta-activa\"\n [routerLinkActiveOptions]=\"{ exact: item.ruta === '/' }\"\n [attr.title]=\"!abiertoInterno() ? item.nombre : null\"\n (click)=\"seleccionarItem(item, nivel)\"\n >\n <td-icon class=\"td-sidebar__icono\" [nombre]=\"item.icono || 'folder'\" />\n @if (abiertoInterno()) {\n <span>{{ item.nombre }}</span>\n }\n </a>\n }\n\n @if (abiertoInterno() && tieneHijos && estaExpandido(clave)) {\n <ng-container\n [ngTemplateOutlet]=\"listaMenu\"\n [ngTemplateOutletContext]=\"{\n items: item.subMenus,\n nivel: nivel + 1,\n padre: clave\n }\"\n />\n }\n </li>\n }\n </ul>\n</ng-template>\n", styles: [":host{display:block;height:100%}*{box-sizing:border-box}.td-sidebar{--td-fondo: #fff;--td-borde: #e2e8f0;--td-texto: #334155;--td-texto-suave: #64748b;--td-hover: #f1f5f9;--td-activo: #e8efff;--td-acento: #2563eb;display:flex;width:18rem;height:100%;min-height:28rem;flex-direction:column;overflow:hidden;border-right:1px solid var(--td-borde);color:var(--td-texto);background:var(--td-fondo);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;transition:width .2s ease,background .2s ease,border-color .2s ease}.td-sidebar--oscuro{--td-fondo: #09090b;--td-borde: #27272a;--td-texto: #d4d4d8;--td-texto-suave: #71717a;--td-hover: #18181b;--td-activo: #172554;--td-acento: #60a5fa}.td-sidebar--compacto{width:5rem}.td-sidebar--oculto{width:0;min-width:0;border-right-width:0;visibility:hidden}.td-sidebar__marca{display:flex;min-height:5rem;align-items:center;gap:.75rem;border-bottom:1px solid var(--td-borde);padding:1rem}.td-sidebar__logo{display:grid;width:2.75rem;height:2.75rem;flex:0 0 2.75rem;place-items:center;overflow:hidden;border:1px solid var(--td-borde);border-radius:.75rem;color:#fff;background:linear-gradient(135deg,#2563eb,#6d28d9);font-size:1.15rem;font-weight:800}.td-sidebar__logo img{width:75%;height:75%;object-fit:contain}.td-sidebar__marca-texto{min-width:0;flex:1}.td-sidebar__marca-texto small,.td-sidebar__marca-texto strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.td-sidebar__marca-texto small{color:var(--td-acento);font-size:.64rem;font-weight:750;letter-spacing:.12em;text-transform:uppercase}.td-sidebar__marca-texto strong{margin-top:.18rem;font-size:.84rem}.td-sidebar__encabezado{min-height:3.35rem;padding:1.25rem 1rem .65rem;color:var(--td-texto-suave);font-size:.66rem;font-weight:750;letter-spacing:.12em;text-transform:uppercase}.td-sidebar--compacto .td-sidebar__encabezado{text-align:center}.td-sidebar__nav{min-height:0;flex:1;overflow-x:hidden;overflow-y:auto;padding:0 .7rem 1rem;scrollbar-width:thin;scrollbar-color:var(--td-borde) transparent}.td-sidebar__lista{margin:0;padding:0;list-style:none}.td-sidebar__lista--anidada{position:relative;margin:.2rem 0 .35rem 1.25rem;padding-left:.7rem}.td-sidebar__lista--anidada:before{position:absolute;inset:0 auto 0 0;width:1px;background:var(--td-borde);content:\"\"}.td-sidebar__item+.td-sidebar__item{margin-top:.2rem}.td-sidebar__enlace{display:flex;width:100%;min-width:0;min-height:2.5rem;align-items:center;gap:.7rem;border:0;border-radius:.55rem;padding:.55rem .7rem;color:var(--td-texto);background:transparent;font:inherit;font-size:.82rem;font-weight:600;text-align:left;text-decoration:none;cursor:pointer;transition:color .12s ease,background .12s ease}.td-sidebar__enlace:hover{background:var(--td-hover)}.td-sidebar__enlace--activo,.td-sidebar__enlace--ruta-activa{color:var(--td-acento);background:var(--td-activo)}.td-sidebar__enlace span{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}.td-sidebar__icono{width:1.15rem;height:1.15rem;flex:0 0 1.15rem}.td-sidebar__flecha{width:.9rem;height:.9rem;flex:0 0 .9rem;transition:transform .16s ease}.td-sidebar__flecha--abierta{transform:rotate(90deg)}.td-sidebar--compacto .td-sidebar__marca{justify-content:center;padding-inline:.7rem}.td-sidebar--compacto .td-sidebar__nav{padding-inline:.65rem}.td-sidebar--compacto .td-sidebar__enlace{justify-content:center;padding-inline:0}.td-sidebar__lista--anidada .td-sidebar__enlace{min-height:2.2rem;font-size:.75rem;font-weight:500}.td-sidebar__lista--anidada .td-sidebar__lista--anidada .td-sidebar__enlace{min-height:2rem;color:var(--td-texto-suave);font-size:.7rem}.td-sidebar__estado{margin:0;padding:.75rem;color:var(--td-texto-suave);font-size:.75rem;line-height:1.45}.td-sidebar__estado--error{color:#d97706}@media(prefers-reduced-motion:reduce){.td-sidebar,.td-sidebar__flecha{transition:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: TdIcon, selector: "td-icon", inputs: ["nombre", "titulo", "tamano"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
432
697
|
}
|
|
433
698
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TdSidebar, decorators: [{
|
|
434
699
|
type: Component,
|
|
435
|
-
args: [{ selector: 'td-sidebar', imports: [NgTemplateOutlet, RouterLink, RouterLinkActive], changeDetection: ChangeDetectionStrategy.OnPush, template: "<aside
|
|
700
|
+
args: [{ selector: 'td-sidebar', imports: [NgTemplateOutlet, RouterLink, RouterLinkActive, TdIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<aside\n class=\"td-sidebar\"\n [class.td-sidebar--compacto]=\"!abiertoInterno() && modoCerrado === 'compacto'\"\n [class.td-sidebar--oculto]=\"!abiertoInterno() && modoCerrado === 'oculto'\"\n [class.td-sidebar--oscuro]=\"oscuro\"\n [attr.aria-hidden]=\"!abiertoInterno() && modoCerrado === 'oculto'\"\n>\n <header class=\"td-sidebar__marca\">\n <div class=\"td-sidebar__logo\">\n @if (logoUrl) {\n <img [src]=\"logoUrl\" [alt]=\"logoAlt\" />\n } @else {\n <span>{{ inicialMarca() }}</span>\n }\n </div>\n\n @if (abiertoInterno()) {\n <div class=\"td-sidebar__marca-texto\">\n <small>{{ subtitulo }}</small>\n <strong>{{ titulo }}</strong>\n </div>\n }\n\n </header>\n\n <div class=\"td-sidebar__encabezado\">\n @if (abiertoInterno()) {\n <span>{{ etiquetaNavegacion }}</span>\n } @else {\n <span aria-hidden=\"true\">\u2022\u2022\u2022</span>\n }\n </div>\n\n <nav class=\"td-sidebar__nav\" aria-label=\"Men\u00FA principal\">\n @if (cargando) {\n <p class=\"td-sidebar__estado\">{{ textoCarga }}</p>\n } @else if (error) {\n <p class=\"td-sidebar__estado td-sidebar__estado--error\">{{ error }}</p>\n } @else if (!menuNormalizado().length) {\n <p class=\"td-sidebar__estado\">{{ mensajeVacio }}</p>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"listaMenu\"\n [ngTemplateOutletContext]=\"{ items: menuNormalizado(), nivel: 0, padre: 'raiz' }\"\n />\n }\n </nav>\n</aside>\n\n<ng-template #listaMenu let-items=\"items\" let-nivel=\"nivel\" let-padre=\"padre\">\n <ul class=\"td-sidebar__lista\" [class.td-sidebar__lista--anidada]=\"nivel > 0\">\n @for (item of items; track item) {\n @let clave = claveItem(item, padre, $index);\n @let tieneHijos = item.subMenus.length > 0;\n\n <li class=\"td-sidebar__item\">\n @if (tieneHijos) {\n <button\n class=\"td-sidebar__enlace\"\n type=\"button\"\n [class.td-sidebar__enlace--activo]=\"estaExpandido(clave)\"\n [attr.aria-expanded]=\"estaExpandido(clave)\"\n [attr.title]=\"!abiertoInterno() ? item.nombre : null\"\n (click)=\"alternarGrupo(clave)\"\n >\n <td-icon class=\"td-sidebar__icono\" [nombre]=\"item.icono || 'folder'\" />\n @if (abiertoInterno()) {\n <span>{{ item.nombre }}</span>\n <td-icon\n class=\"td-sidebar__flecha\"\n [class.td-sidebar__flecha--abierta]=\"estaExpandido(clave)\"\n nombre=\"chevron_right\"\n />\n }\n </button>\n } @else {\n <a\n class=\"td-sidebar__enlace\"\n [routerLink]=\"item.ruta || '/'\"\n routerLinkActive=\"td-sidebar__enlace--ruta-activa\"\n [routerLinkActiveOptions]=\"{ exact: item.ruta === '/' }\"\n [attr.title]=\"!abiertoInterno() ? item.nombre : null\"\n (click)=\"seleccionarItem(item, nivel)\"\n >\n <td-icon class=\"td-sidebar__icono\" [nombre]=\"item.icono || 'folder'\" />\n @if (abiertoInterno()) {\n <span>{{ item.nombre }}</span>\n }\n </a>\n }\n\n @if (abiertoInterno() && tieneHijos && estaExpandido(clave)) {\n <ng-container\n [ngTemplateOutlet]=\"listaMenu\"\n [ngTemplateOutletContext]=\"{\n items: item.subMenus,\n nivel: nivel + 1,\n padre: clave\n }\"\n />\n }\n </li>\n }\n </ul>\n</ng-template>\n", styles: [":host{display:block;height:100%}*{box-sizing:border-box}.td-sidebar{--td-fondo: #fff;--td-borde: #e2e8f0;--td-texto: #334155;--td-texto-suave: #64748b;--td-hover: #f1f5f9;--td-activo: #e8efff;--td-acento: #2563eb;display:flex;width:18rem;height:100%;min-height:28rem;flex-direction:column;overflow:hidden;border-right:1px solid var(--td-borde);color:var(--td-texto);background:var(--td-fondo);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;transition:width .2s ease,background .2s ease,border-color .2s ease}.td-sidebar--oscuro{--td-fondo: #09090b;--td-borde: #27272a;--td-texto: #d4d4d8;--td-texto-suave: #71717a;--td-hover: #18181b;--td-activo: #172554;--td-acento: #60a5fa}.td-sidebar--compacto{width:5rem}.td-sidebar--oculto{width:0;min-width:0;border-right-width:0;visibility:hidden}.td-sidebar__marca{display:flex;min-height:5rem;align-items:center;gap:.75rem;border-bottom:1px solid var(--td-borde);padding:1rem}.td-sidebar__logo{display:grid;width:2.75rem;height:2.75rem;flex:0 0 2.75rem;place-items:center;overflow:hidden;border:1px solid var(--td-borde);border-radius:.75rem;color:#fff;background:linear-gradient(135deg,#2563eb,#6d28d9);font-size:1.15rem;font-weight:800}.td-sidebar__logo img{width:75%;height:75%;object-fit:contain}.td-sidebar__marca-texto{min-width:0;flex:1}.td-sidebar__marca-texto small,.td-sidebar__marca-texto strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.td-sidebar__marca-texto small{color:var(--td-acento);font-size:.64rem;font-weight:750;letter-spacing:.12em;text-transform:uppercase}.td-sidebar__marca-texto strong{margin-top:.18rem;font-size:.84rem}.td-sidebar__encabezado{min-height:3.35rem;padding:1.25rem 1rem .65rem;color:var(--td-texto-suave);font-size:.66rem;font-weight:750;letter-spacing:.12em;text-transform:uppercase}.td-sidebar--compacto .td-sidebar__encabezado{text-align:center}.td-sidebar__nav{min-height:0;flex:1;overflow-x:hidden;overflow-y:auto;padding:0 .7rem 1rem;scrollbar-width:thin;scrollbar-color:var(--td-borde) transparent}.td-sidebar__lista{margin:0;padding:0;list-style:none}.td-sidebar__lista--anidada{position:relative;margin:.2rem 0 .35rem 1.25rem;padding-left:.7rem}.td-sidebar__lista--anidada:before{position:absolute;inset:0 auto 0 0;width:1px;background:var(--td-borde);content:\"\"}.td-sidebar__item+.td-sidebar__item{margin-top:.2rem}.td-sidebar__enlace{display:flex;width:100%;min-width:0;min-height:2.5rem;align-items:center;gap:.7rem;border:0;border-radius:.55rem;padding:.55rem .7rem;color:var(--td-texto);background:transparent;font:inherit;font-size:.82rem;font-weight:600;text-align:left;text-decoration:none;cursor:pointer;transition:color .12s ease,background .12s ease}.td-sidebar__enlace:hover{background:var(--td-hover)}.td-sidebar__enlace--activo,.td-sidebar__enlace--ruta-activa{color:var(--td-acento);background:var(--td-activo)}.td-sidebar__enlace span{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}.td-sidebar__icono{width:1.15rem;height:1.15rem;flex:0 0 1.15rem}.td-sidebar__flecha{width:.9rem;height:.9rem;flex:0 0 .9rem;transition:transform .16s ease}.td-sidebar__flecha--abierta{transform:rotate(90deg)}.td-sidebar--compacto .td-sidebar__marca{justify-content:center;padding-inline:.7rem}.td-sidebar--compacto .td-sidebar__nav{padding-inline:.65rem}.td-sidebar--compacto .td-sidebar__enlace{justify-content:center;padding-inline:0}.td-sidebar__lista--anidada .td-sidebar__enlace{min-height:2.2rem;font-size:.75rem;font-weight:500}.td-sidebar__lista--anidada .td-sidebar__lista--anidada .td-sidebar__enlace{min-height:2rem;color:var(--td-texto-suave);font-size:.7rem}.td-sidebar__estado{margin:0;padding:.75rem;color:var(--td-texto-suave);font-size:.75rem;line-height:1.45}.td-sidebar__estado--error{color:#d97706}@media(prefers-reduced-motion:reduce){.td-sidebar,.td-sidebar__flecha{transition:none}}\n"] }]
|
|
436
701
|
}], propDecorators: { titulo: [{
|
|
437
702
|
type: Input
|
|
438
703
|
}], subtitulo: [{
|
|
@@ -453,6 +718,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
453
718
|
type: Input
|
|
454
719
|
}], oscuro: [{
|
|
455
720
|
type: Input
|
|
721
|
+
}], modoCerrado: [{
|
|
722
|
+
type: Input
|
|
456
723
|
}], abierto: [{
|
|
457
724
|
type: Input
|
|
458
725
|
}], menu: [{
|
|
@@ -462,21 +729,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
462
729
|
}], seleccionar: [{
|
|
463
730
|
type: Output
|
|
464
731
|
}] } });
|
|
465
|
-
const ICONOS = {
|
|
466
|
-
home: 'M3 10.5 12 3l9 7.5V21a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1V10.5Z',
|
|
467
|
-
dashboard: 'M4 3h6a1 1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 5v6c0 5.05 3.41 9.74 8 11 4.59-1.26 8-5.95 8-11V5l-8-3Zm-1 14-4-4 1.4-1.4 2.6 2.58 5.6-5.58L18 9l-7 7Z',
|
|
473
|
-
inventory: 'm12 2 9 5-9 5-9-5 9-5Zm-7 8.5 6 3.33V22l-6-3.33V10.5Zm8 11.5v-8.17l6-3.33v8.17L13 22Z',
|
|
474
|
-
shopping_cart: 'M7 18a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm10 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM6.2 6l.8 2h11.6l-1.9 5H8.1L4.3 3H1v2h2l3.6 9.6A2 2 0 0 0 8.5 16H19v-2H8.5l-.4-1H18a2 2 0 0 0 1.86-1.27L22 6H6.2Z',
|
|
475
|
-
receipt: 'M5 2v20l3-2 4 2 4-2 3 2V2l-3 2-4-2-4 2-3-2Zm3 6h8v2H8V8Zm0 4h8v2H8v-2Z',
|
|
476
|
-
assessment: 'M4 20h16v2H4a2 2 0 0 1-2-2V4h2v16Zm3-2H5v-6h2v6Zm4 0H9V7h2v11Zm4 0h-2V4h2v14Zm4 0h-2v-9h2v9Z',
|
|
477
|
-
description: 'M6 2h8l5 5v15H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm7 1.5V8h4.5L13 3.5ZM8 12v2h8v-2H8Zm0 4v2h8v-2H8Z',
|
|
478
|
-
business: 'M3 21V3h10v5h8v13h-7v-4h-2v4H3Zm3-14h2V5H6v2Zm4 0h2V5h-2v2Zm-4 4h2V9H6v2Zm4 0h2V9h-2v2Zm6 1h2v-2h-2v2Zm0 4h2v-2h-2v2Z',
|
|
479
|
-
};
|
|
480
732
|
|
|
481
733
|
/*
|
|
482
734
|
* Public API Surface of telcomdev-ui
|
|
@@ -486,5 +738,5 @@ const ICONOS = {
|
|
|
486
738
|
* Generated bundle index. Do not edit.
|
|
487
739
|
*/
|
|
488
740
|
|
|
489
|
-
export { TdAlerta, TdSidebar, TelcomdevUi };
|
|
741
|
+
export { TD_ICONOS, TD_ICONOS_NOMBRES, TdAlerta, TdFooter, TdHeader, TdIcon, TdIconoRegistry, TdSidebar, TelcomdevUi };
|
|
490
742
|
//# sourceMappingURL=telcomdev-ui.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telcomdev-ui.mjs","sources":["../../../projects/telcomdev-ui/src/lib/telcomdev-ui.ts","../../../projects/telcomdev-ui/src/lib/alerta/td-alerta.ts","../../../projects/telcomdev-ui/src/lib/sidebar/td-sidebar.ts","../../../projects/telcomdev-ui/src/lib/sidebar/td-sidebar.html","../../../projects/telcomdev-ui/src/public-api.ts","../../../projects/telcomdev-ui/src/telcomdev-ui.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'td-telcomdev-ui',\n imports: [],\n template: ` <p>telcomdev-ui works!</p> `,\n styles: ``,\n})\nexport class TelcomdevUi {}\n","export type TdAlertaTipo = 'exito' | 'error' | 'advertencia' | 'info' | 'pregunta';\r\n\r\nexport interface TdAlertaOpciones {\r\n titulo?: string;\r\n mensaje?: string;\r\n tipo?: TdAlertaTipo;\r\n textoConfirmar?: string;\r\n textoCancelar?: string;\r\n mostrarCancelar?: boolean;\r\n cerrarConEscape?: boolean;\r\n cerrarConFondo?: boolean;\r\n}\r\n\r\nexport class TdAlerta {\r\n private static readonly estiloId = 'td-alerta-estilos';\r\n\r\n static exito(mensaje: string, titulo = '¡Operación exitosa!'): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'exito',\r\n textoConfirmar: 'Aceptar',\r\n });\r\n }\r\n\r\n static error(mensaje: string, titulo = '¡Error!'): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'error',\r\n textoConfirmar: 'Cerrar',\r\n });\r\n }\r\n\r\n static errorSistema(mensaje: string, titulo = '¡Error de Sistema!'): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'error',\r\n textoConfirmar: 'Cerrar',\r\n });\r\n }\r\n\r\n static advertencia(mensaje: string, titulo = '¡Advertencia!'): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'advertencia',\r\n textoConfirmar: 'Aceptar',\r\n });\r\n }\r\n\r\n static info(mensaje: string, titulo = 'Información'): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'info',\r\n textoConfirmar: 'Aceptar',\r\n });\r\n }\r\n\r\n static confirmar(\r\n mensaje: string,\r\n titulo = '¿Estás seguro?',\r\n textoConfirmar = 'Sí, continuar',\r\n textoCancelar = 'Cancelar'\r\n ): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'pregunta',\r\n textoConfirmar,\r\n textoCancelar,\r\n mostrarCancelar: true,\r\n });\r\n }\r\n\r\n static confirmarEliminar(\r\n mensaje = 'Esta acción no se puede deshacer.',\r\n titulo = '¿Eliminar registro?'\r\n ): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'advertencia',\r\n textoConfirmar: 'Sí, eliminar',\r\n textoCancelar: 'Cancelar',\r\n mostrarCancelar: true,\r\n });\r\n }\r\n\r\n static mostrar(opciones: TdAlertaOpciones): Promise<boolean> {\r\n if (typeof document === 'undefined') {\r\n return Promise.resolve(false);\r\n }\r\n\r\n this.inyectarEstilos();\r\n\r\n const config: Required<TdAlertaOpciones> = {\r\n titulo: opciones.titulo ?? '',\r\n mensaje: opciones.mensaje ?? '',\r\n tipo: opciones.tipo ?? 'info',\r\n textoConfirmar: opciones.textoConfirmar ?? 'Aceptar',\r\n textoCancelar: opciones.textoCancelar ?? 'Cancelar',\r\n mostrarCancelar: opciones.mostrarCancelar ?? false,\r\n cerrarConEscape: opciones.cerrarConEscape ?? true,\r\n cerrarConFondo: opciones.cerrarConFondo ?? false,\r\n };\r\n\r\n return new Promise<boolean>((resolve) => {\r\n const fondo = document.createElement('div');\r\n fondo.className = 'td-alerta-fondo';\r\n\r\n const modal = document.createElement('div');\r\n modal.className = 'td-alerta-modal';\r\n modal.setAttribute('role', 'dialog');\r\n modal.setAttribute('aria-modal', 'true');\r\n\r\n const icono = document.createElement('div');\r\n icono.className = `td-alerta-icono td-alerta-icono--${config.tipo}`;\r\n icono.textContent = this.obtenerIcono(config.tipo);\r\n\r\n const titulo = document.createElement('h2');\r\n titulo.className = 'td-alerta-titulo';\r\n titulo.textContent = config.titulo;\r\n\r\n const mensaje = document.createElement('p');\r\n mensaje.className = 'td-alerta-mensaje';\r\n mensaje.textContent = config.mensaje;\r\n\r\n const acciones = document.createElement('div');\r\n acciones.className = 'td-alerta-acciones';\r\n\r\n const botonConfirmar = document.createElement('button');\r\n botonConfirmar.type = 'button';\r\n botonConfirmar.className = `td-alerta-boton td-alerta-boton--${config.tipo}`;\r\n botonConfirmar.textContent = config.textoConfirmar;\r\n\r\n const botonCancelar = document.createElement('button');\r\n botonCancelar.type = 'button';\r\n botonCancelar.className = 'td-alerta-boton td-alerta-boton--cancelar';\r\n botonCancelar.textContent = config.textoCancelar;\r\n\r\n const cerrar = (resultado: boolean): void => {\r\n document.removeEventListener('keydown', onKeyDown);\r\n fondo.classList.add('td-alerta-saliendo');\r\n\r\n window.setTimeout(() => {\r\n fondo.remove();\r\n resolve(resultado);\r\n }, 140);\r\n };\r\n\r\n const onKeyDown = (event: KeyboardEvent): void => {\r\n if (event.key === 'Escape' && config.cerrarConEscape) {\r\n cerrar(false);\r\n }\r\n };\r\n\r\n botonConfirmar.addEventListener('click', () => cerrar(true));\r\n botonCancelar.addEventListener('click', () => cerrar(false));\r\n\r\n if (config.cerrarConFondo) {\r\n fondo.addEventListener('click', (event) => {\r\n if (event.target === fondo) {\r\n cerrar(false);\r\n }\r\n });\r\n }\r\n\r\n document.addEventListener('keydown', onKeyDown);\r\n\r\n if (config.mostrarCancelar) {\r\n acciones.appendChild(botonCancelar);\r\n }\r\n\r\n acciones.appendChild(botonConfirmar);\r\n\r\n modal.appendChild(icono);\r\n modal.appendChild(titulo);\r\n\r\n if (config.mensaje) {\r\n modal.appendChild(mensaje);\r\n }\r\n\r\n modal.appendChild(acciones);\r\n fondo.appendChild(modal);\r\n document.body.appendChild(fondo);\r\n\r\n botonConfirmar.focus();\r\n });\r\n }\r\n\r\n private static obtenerIcono(tipo: TdAlertaTipo): string {\r\n const iconos: Record<TdAlertaTipo, string> = {\r\n exito: '✓',\r\n error: '!',\r\n advertencia: '!',\r\n info: 'i',\r\n pregunta: '?',\r\n };\r\n\r\n return iconos[tipo];\r\n }\r\n\r\n private static inyectarEstilos(): void {\r\n if (document.getElementById(this.estiloId)) return;\r\n\r\n const style = document.createElement('style');\r\n style.id = this.estiloId;\r\n style.textContent = `\r\n .td-alerta-fondo {\r\n position: fixed;\r\n inset: 0;\r\n z-index: 99999;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 1rem;\r\n background: rgba(15, 23, 42, 0.52);\r\n animation: td-alerta-fondo-entrada 160ms ease-out;\r\n }\r\n\r\n .td-alerta-modal {\r\n width: min(100%, 430px);\r\n border-radius: 18px;\r\n background: #ffffff;\r\n padding: 1.75rem;\r\n text-align: center;\r\n box-shadow: 0 22px 70px rgba(15, 23, 42, 0.28);\r\n animation: td-alerta-modal-entrada 180ms ease-out;\r\n font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\r\n }\r\n\r\n .td-alerta-icono {\r\n width: 4.25rem;\r\n height: 4.25rem;\r\n margin: 0 auto 1rem;\r\n border-radius: 999px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n font-size: 2.1rem;\r\n font-weight: 800;\r\n }\r\n\r\n .td-alerta-icono--exito {\r\n color: #16a34a;\r\n background: #dcfce7;\r\n }\r\n\r\n .td-alerta-icono--error {\r\n color: #ef4444;\r\n background: #fee2e2;\r\n }\r\n\r\n .td-alerta-icono--advertencia {\r\n color: #f59e0b;\r\n background: #fef3c7;\r\n }\r\n\r\n .td-alerta-icono--info {\r\n color: #2563eb;\r\n background: #dbeafe;\r\n }\r\n\r\n .td-alerta-icono--pregunta {\r\n color: #7c3aed;\r\n background: #ede9fe;\r\n }\r\n\r\n .td-alerta-titulo {\r\n margin: 0;\r\n color: #111827;\r\n font-size: 1.35rem;\r\n line-height: 1.25;\r\n font-weight: 800;\r\n }\r\n\r\n .td-alerta-mensaje {\r\n margin: 0.75rem 0 0;\r\n color: #4b5563;\r\n font-size: 0.96rem;\r\n line-height: 1.55;\r\n }\r\n\r\n .td-alerta-acciones {\r\n display: flex;\r\n justify-content: center;\r\n gap: 0.75rem;\r\n margin-top: 1.5rem;\r\n }\r\n\r\n .td-alerta-boton {\r\n border: 0;\r\n border-radius: 10px;\r\n padding: 0.7rem 1.2rem;\r\n color: #ffffff;\r\n font-size: 0.93rem;\r\n font-weight: 700;\r\n cursor: pointer;\r\n transition: transform 120ms ease, filter 120ms ease, background 120ms ease;\r\n }\r\n\r\n .td-alerta-boton:hover {\r\n filter: brightness(0.96);\r\n }\r\n\r\n .td-alerta-boton:active {\r\n transform: scale(0.98);\r\n }\r\n\r\n .td-alerta-boton:focus {\r\n outline: 3px solid rgba(37, 99, 235, 0.25);\r\n outline-offset: 2px;\r\n }\r\n\r\n .td-alerta-boton--exito {\r\n background: #22c55e;\r\n }\r\n\r\n .td-alerta-boton--error {\r\n background: #ef4444;\r\n }\r\n\r\n .td-alerta-boton--advertencia {\r\n background: #f59e0b;\r\n }\r\n\r\n .td-alerta-boton--info {\r\n background: #2563eb;\r\n }\r\n\r\n .td-alerta-boton--pregunta {\r\n background: #7c3aed;\r\n }\r\n\r\n .td-alerta-boton--cancelar {\r\n background: #6b7280;\r\n }\r\n\r\n .td-alerta-saliendo {\r\n animation: td-alerta-fondo-salida 140ms ease-in forwards;\r\n }\r\n\r\n .td-alerta-saliendo .td-alerta-modal {\r\n animation: td-alerta-modal-salida 140ms ease-in forwards;\r\n }\r\n\r\n @keyframes td-alerta-fondo-entrada {\r\n from { opacity: 0; }\r\n to { opacity: 1; }\r\n }\r\n\r\n @keyframes td-alerta-modal-entrada {\r\n from {\r\n opacity: 0;\r\n transform: translateY(12px) scale(0.96);\r\n }\r\n to {\r\n opacity: 1;\r\n transform: translateY(0) scale(1);\r\n }\r\n }\r\n\r\n @keyframes td-alerta-fondo-salida {\r\n from { opacity: 1; }\r\n to { opacity: 0; }\r\n }\r\n\r\n @keyframes td-alerta-modal-salida {\r\n from {\r\n opacity: 1;\r\n transform: translateY(0) scale(1);\r\n }\r\n to {\r\n opacity: 0;\r\n transform: translateY(8px) scale(0.97);\r\n }\r\n }\r\n\r\n @media (max-width: 480px) {\r\n .td-alerta-modal {\r\n padding: 1.4rem;\r\n border-radius: 16px;\r\n }\r\n\r\n .td-alerta-acciones {\r\n flex-direction: column-reverse;\r\n }\r\n\r\n .td-alerta-boton {\r\n width: 100%;\r\n }\r\n }\r\n `;\r\n\r\n document.head.appendChild(style);\r\n }\r\n}","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n signal,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { MenuSidebar, TdSidebarSeleccion } from './menu-sidebar';\n\n@Component({\n selector: 'td-sidebar',\n imports: [NgTemplateOutlet, RouterLink, RouterLinkActive],\n templateUrl: './td-sidebar.html',\n styleUrl: './td-sidebar.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdSidebar {\n @Input() titulo = 'Gestión Corporativa';\n @Input() subtitulo = 'Central Platform';\n @Input() etiquetaNavegacion = 'Navegación';\n @Input() logoUrl = '';\n @Input() logoAlt = 'Logo';\n @Input() textoCarga = 'Cargando menú...';\n @Input() mensajeVacio = 'No hay opciones disponibles.';\n @Input() error = '';\n @Input() cargando = false;\n @Input() oscuro = false;\n\n @Input()\n set abierto(value: boolean) {\n this.abiertoInterno.set(value);\n }\n get abierto(): boolean {\n return this.abiertoInterno();\n }\n\n @Input()\n set menu(value: MenuSidebar[] | null | undefined) {\n this.menuNormalizado.set(this.normalizarMenu(value ?? []));\n }\n get menu(): MenuSidebar[] {\n return this.menuNormalizado();\n }\n\n @Output() readonly abiertoChange = new EventEmitter<boolean>();\n @Output() readonly seleccionar = new EventEmitter<TdSidebarSeleccion>();\n\n protected readonly abiertoInterno = signal(true);\n protected readonly menuNormalizado = signal<MenuSidebar[]>([]);\n protected readonly expandidos = signal<ReadonlySet<string>>(new Set<string>());\n\n protected alternarSidebar(): void {\n const siguiente = !this.abiertoInterno();\n this.abiertoInterno.set(siguiente);\n this.abiertoChange.emit(siguiente);\n }\n\n protected alternarGrupo(clave: string): void {\n if (!this.abiertoInterno()) {\n this.abiertoInterno.set(true);\n this.abiertoChange.emit(true);\n }\n\n this.expandidos.update((actuales) => {\n const siguientes = new Set(actuales);\n siguientes.has(clave) ? siguientes.delete(clave) : siguientes.add(clave);\n return siguientes;\n });\n }\n\n protected estaExpandido(clave: string): boolean {\n return this.expandidos().has(clave);\n }\n\n protected seleccionarItem(item: MenuSidebar, nivel: number): void {\n this.seleccionar.emit({ item, nivel });\n }\n\n protected claveItem(item: MenuSidebar, padre: string, indice: number): string {\n return `${padre}/${item.nombre}-${indice}`;\n }\n\n protected inicialMarca(): string {\n return (this.titulo.trim().charAt(0) || 'T').toUpperCase();\n }\n\n protected iconoPath(icono: string | null): string {\n const nombre = (icono ?? '').trim().toLowerCase();\n return ICONOS[nombre] ?? ICONOS['folder'];\n }\n\n private normalizarMenu(items: MenuSidebar[]): MenuSidebar[] {\n return [...items]\n .sort((a, b) => a.orden - b.orden)\n .map((item) => ({\n ...item,\n icono: item.icono?.trim() || 'folder',\n subMenus: this.normalizarMenu(item.subMenus ?? []),\n }));\n }\n}\n\nconst ICONOS: Record<string, string> = {\n home: 'M3 10.5 12 3l9 7.5V21a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1V10.5Z',\n dashboard:\n 'M4 3h6a1 1 0 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-11V5l-8-3Zm-1 14-4-4 1.4-1.4 2.6 2.58 5.6-5.58L18 9l-7 7Z',\n inventory:\n 'm12 2 9 5-9 5-9-5 9-5Zm-7 8.5 6 3.33V22l-6-3.33V10.5Zm8 11.5v-8.17l6-3.33v8.17L13 22Z',\n shopping_cart:\n 'M7 18a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm10 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM6.2 6l.8 2h11.6l-1.9 5H8.1L4.3 3H1v2h2l3.6 9.6A2 2 0 0 0 8.5 16H19v-2H8.5l-.4-1H18a2 2 0 0 0 1.86-1.27L22 6H6.2Z',\n receipt: 'M5 2v20l3-2 4 2 4-2 3 2V2l-3 2-4-2-4 2-3-2Zm3 6h8v2H8V8Zm0 4h8v2H8v-2Z',\n assessment:\n 'M4 20h16v2H4a2 2 0 0 1-2-2V4h2v16Zm3-2H5v-6h2v6Zm4 0H9V7h2v11Zm4 0h-2V4h2v14Zm4 0h-2v-9h2v9Z',\n description:\n 'M6 2h8l5 5v15H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm7 1.5V8h4.5L13 3.5ZM8 12v2h8v-2H8Zm0 4v2h8v-2H8Z',\n business:\n 'M3 21V3h10v5h8v13h-7v-4h-2v4H3Zm3-14h2V5H6v2Zm4 0h2V5h-2v2Zm-4 4h2V9H6v2Zm4 0h2V9h-2v2Zm6 1h2v-2h-2v2Zm0 4h2v-2h-2v2Z',\n};\n","<aside class=\"td-sidebar\" [class.td-sidebar--compacto]=\"!abiertoInterno()\" [class.td-sidebar--oscuro]=\"oscuro\">\n <header class=\"td-sidebar__marca\">\n <div class=\"td-sidebar__logo\">\n @if (logoUrl) {\n <img [src]=\"logoUrl\" [alt]=\"logoAlt\" />\n } @else {\n <span>{{ inicialMarca() }}</span>\n }\n </div>\n\n @if (abiertoInterno()) {\n <div class=\"td-sidebar__marca-texto\">\n <small>{{ subtitulo }}</small>\n <strong>{{ titulo }}</strong>\n </div>\n }\n\n <button\n class=\"td-sidebar__alternador\"\n type=\"button\"\n [attr.aria-label]=\"abiertoInterno() ? 'Contraer menú' : 'Expandir menú'\"\n [attr.title]=\"abiertoInterno() ? 'Contraer menú' : 'Expandir menú'\"\n (click)=\"alternarSidebar()\"\n >\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path d=\"m14.5 6-6 6 6 6\" />\n </svg>\n </button>\n </header>\n\n <div class=\"td-sidebar__encabezado\">\n @if (abiertoInterno()) {\n <span>{{ etiquetaNavegacion }}</span>\n } @else {\n <span aria-hidden=\"true\">•••</span>\n }\n </div>\n\n <nav class=\"td-sidebar__nav\" aria-label=\"Menú principal\">\n @if (cargando) {\n <p class=\"td-sidebar__estado\">{{ textoCarga }}</p>\n } @else if (error) {\n <p class=\"td-sidebar__estado td-sidebar__estado--error\">{{ error }}</p>\n } @else if (!menuNormalizado().length) {\n <p class=\"td-sidebar__estado\">{{ mensajeVacio }}</p>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"listaMenu\"\n [ngTemplateOutletContext]=\"{ items: menuNormalizado(), nivel: 0, padre: 'raiz' }\"\n />\n }\n </nav>\n</aside>\n\n<ng-template #listaMenu let-items=\"items\" let-nivel=\"nivel\" let-padre=\"padre\">\n <ul class=\"td-sidebar__lista\" [class.td-sidebar__lista--anidada]=\"nivel > 0\">\n @for (item of items; track item) {\n @let clave = claveItem(item, padre, $index);\n @let tieneHijos = item.subMenus.length > 0;\n\n <li class=\"td-sidebar__item\">\n @if (tieneHijos) {\n <button\n class=\"td-sidebar__enlace\"\n type=\"button\"\n [class.td-sidebar__enlace--activo]=\"estaExpandido(clave)\"\n [attr.aria-expanded]=\"estaExpandido(clave)\"\n [attr.title]=\"!abiertoInterno() ? item.nombre : null\"\n (click)=\"alternarGrupo(clave)\"\n >\n <svg class=\"td-sidebar__icono\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path [attr.d]=\"iconoPath(item.icono)\" />\n </svg>\n @if (abiertoInterno()) {\n <span>{{ item.nombre }}</span>\n <svg\n class=\"td-sidebar__flecha\"\n [class.td-sidebar__flecha--abierta]=\"estaExpandido(clave)\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 6 6 6-6 6\" />\n </svg>\n }\n </button>\n } @else {\n <a\n class=\"td-sidebar__enlace\"\n [routerLink]=\"item.ruta || '/'\"\n routerLinkActive=\"td-sidebar__enlace--ruta-activa\"\n [routerLinkActiveOptions]=\"{ exact: item.ruta === '/' }\"\n [attr.title]=\"!abiertoInterno() ? item.nombre : null\"\n (click)=\"seleccionarItem(item, nivel)\"\n >\n <svg class=\"td-sidebar__icono\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path [attr.d]=\"iconoPath(item.icono)\" />\n </svg>\n @if (abiertoInterno()) {\n <span>{{ item.nombre }}</span>\n }\n </a>\n }\n\n @if (abiertoInterno() && tieneHijos && estaExpandido(clave)) {\n <ng-container\n [ngTemplateOutlet]=\"listaMenu\"\n [ngTemplateOutletContext]=\"{\n items: item.subMenus,\n nivel: nivel + 1,\n padre: clave\n }\"\n />\n }\n </li>\n }\n </ul>\n</ng-template>\n","/*\n * Public API Surface of telcomdev-ui\n */\n\nexport * from './lib/telcomdev-ui';\nexport * from './lib/alerta';\nexport * from './lib/sidebar';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAQa,WAAW,CAAA;wGAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,WAAW,2EAHZ,CAAA,4BAAA,CAA8B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAG7B,W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A,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAK7C,SAAS,EAAA,UAAA,EAAA,CAAA;kBAPrB,SAAS;+BACE,YAAY,EAAA,OAAA,EACb,CAAC,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,CAAC,EAAA,eAAA,EAGxC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2jIAAA,EAAA,MAAA,EAAA,CAAA,q0IAAA,CAAA,EAAA;;sBAG9C;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBAEA;;sBAQA;;sBAQA;;sBACA;;AAyDH,MAAM,MAAM,GAA2B;AACrC,IAAA,IAAI,EAAE,qEAAqE;AAC3E,IAAA,SAAS,EACP,4RAA4R;AAC9R,IAAA,MAAM,EACJ,8EAA8E;AAChF,IAAA,QAAQ,EACN,6VAA6V;AAC/V,IAAA,MAAM,EACJ,oNAAoN;AACtN,IAAA,MAAM,EACJ,wFAAwF;AAC1F,IAAA,QAAQ,EACN,gHAAgH;AAClH,IAAA,SAAS,EACP,uFAAuF;AACzF,IAAA,aAAa,EACX,uLAAuL;AACzL,IAAA,OAAO,EAAE,wEAAwE;AACjF,IAAA,UAAU,EACR,8FAA8F;AAChG,IAAA,WAAW,EACT,iGAAiG;AACnG,IAAA,QAAQ,EACN,uHAAuH;CAC1H;;AElID;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"telcomdev-ui.mjs","sources":["../../../projects/telcomdev-ui/src/lib/telcomdev-ui.ts","../../../projects/telcomdev-ui/src/lib/alerta/td-alerta.ts","../../../projects/telcomdev-ui/src/lib/footer/td-footer.ts","../../../projects/telcomdev-ui/src/lib/footer/td-footer.html","../../../projects/telcomdev-ui/src/lib/iconos/td-iconos.ts","../../../projects/telcomdev-ui/src/lib/iconos/td-icono-registry.ts","../../../projects/telcomdev-ui/src/lib/iconos/td-icon.ts","../../../projects/telcomdev-ui/src/lib/header/td-header.ts","../../../projects/telcomdev-ui/src/lib/header/td-header.html","../../../projects/telcomdev-ui/src/lib/sidebar/td-sidebar.ts","../../../projects/telcomdev-ui/src/lib/sidebar/td-sidebar.html","../../../projects/telcomdev-ui/src/public-api.ts","../../../projects/telcomdev-ui/src/telcomdev-ui.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'td-telcomdev-ui',\n imports: [],\n template: ` <p>telcomdev-ui works!</p> `,\n styles: ``,\n})\nexport class TelcomdevUi {}\n","export type TdAlertaTipo = 'exito' | 'error' | 'advertencia' | 'info' | 'pregunta';\r\n\r\nexport interface TdAlertaOpciones {\r\n titulo?: string;\r\n mensaje?: string;\r\n tipo?: TdAlertaTipo;\r\n textoConfirmar?: string;\r\n textoCancelar?: string;\r\n mostrarCancelar?: boolean;\r\n cerrarConEscape?: boolean;\r\n cerrarConFondo?: boolean;\r\n}\r\n\r\nexport class TdAlerta {\r\n private static readonly estiloId = 'td-alerta-estilos';\r\n\r\n static exito(mensaje: string, titulo = '¡Operación exitosa!'): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'exito',\r\n textoConfirmar: 'Aceptar',\r\n });\r\n }\r\n\r\n static error(mensaje: string, titulo = '¡Error!'): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'error',\r\n textoConfirmar: 'Cerrar',\r\n });\r\n }\r\n\r\n static errorSistema(mensaje: string, titulo = '¡Error de Sistema!'): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'error',\r\n textoConfirmar: 'Cerrar',\r\n });\r\n }\r\n\r\n static advertencia(mensaje: string, titulo = '¡Advertencia!'): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'advertencia',\r\n textoConfirmar: 'Aceptar',\r\n });\r\n }\r\n\r\n static info(mensaje: string, titulo = 'Información'): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'info',\r\n textoConfirmar: 'Aceptar',\r\n });\r\n }\r\n\r\n static confirmar(\r\n mensaje: string,\r\n titulo = '¿Estás seguro?',\r\n textoConfirmar = 'Sí, continuar',\r\n textoCancelar = 'Cancelar'\r\n ): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'pregunta',\r\n textoConfirmar,\r\n textoCancelar,\r\n mostrarCancelar: true,\r\n });\r\n }\r\n\r\n static confirmarEliminar(\r\n mensaje = 'Esta acción no se puede deshacer.',\r\n titulo = '¿Eliminar registro?'\r\n ): Promise<boolean> {\r\n return this.mostrar({\r\n titulo,\r\n mensaje,\r\n tipo: 'advertencia',\r\n textoConfirmar: 'Sí, eliminar',\r\n textoCancelar: 'Cancelar',\r\n mostrarCancelar: true,\r\n });\r\n }\r\n\r\n static mostrar(opciones: TdAlertaOpciones): Promise<boolean> {\r\n if (typeof document === 'undefined') {\r\n return Promise.resolve(false);\r\n }\r\n\r\n this.inyectarEstilos();\r\n\r\n const config: Required<TdAlertaOpciones> = {\r\n titulo: opciones.titulo ?? '',\r\n mensaje: opciones.mensaje ?? '',\r\n tipo: opciones.tipo ?? 'info',\r\n textoConfirmar: opciones.textoConfirmar ?? 'Aceptar',\r\n textoCancelar: opciones.textoCancelar ?? 'Cancelar',\r\n mostrarCancelar: opciones.mostrarCancelar ?? false,\r\n cerrarConEscape: opciones.cerrarConEscape ?? true,\r\n cerrarConFondo: opciones.cerrarConFondo ?? false,\r\n };\r\n\r\n return new Promise<boolean>((resolve) => {\r\n const fondo = document.createElement('div');\r\n fondo.className = 'td-alerta-fondo';\r\n\r\n const modal = document.createElement('div');\r\n modal.className = 'td-alerta-modal';\r\n modal.setAttribute('role', 'dialog');\r\n modal.setAttribute('aria-modal', 'true');\r\n\r\n const icono = document.createElement('div');\r\n icono.className = `td-alerta-icono td-alerta-icono--${config.tipo}`;\r\n icono.textContent = this.obtenerIcono(config.tipo);\r\n\r\n const titulo = document.createElement('h2');\r\n titulo.className = 'td-alerta-titulo';\r\n titulo.textContent = config.titulo;\r\n\r\n const mensaje = document.createElement('p');\r\n mensaje.className = 'td-alerta-mensaje';\r\n mensaje.textContent = config.mensaje;\r\n\r\n const acciones = document.createElement('div');\r\n acciones.className = 'td-alerta-acciones';\r\n\r\n const botonConfirmar = document.createElement('button');\r\n botonConfirmar.type = 'button';\r\n botonConfirmar.className = `td-alerta-boton td-alerta-boton--${config.tipo}`;\r\n botonConfirmar.textContent = config.textoConfirmar;\r\n\r\n const botonCancelar = document.createElement('button');\r\n botonCancelar.type = 'button';\r\n botonCancelar.className = 'td-alerta-boton td-alerta-boton--cancelar';\r\n botonCancelar.textContent = config.textoCancelar;\r\n\r\n const cerrar = (resultado: boolean): void => {\r\n document.removeEventListener('keydown', onKeyDown);\r\n fondo.classList.add('td-alerta-saliendo');\r\n\r\n window.setTimeout(() => {\r\n fondo.remove();\r\n resolve(resultado);\r\n }, 140);\r\n };\r\n\r\n const onKeyDown = (event: KeyboardEvent): void => {\r\n if (event.key === 'Escape' && config.cerrarConEscape) {\r\n cerrar(false);\r\n }\r\n };\r\n\r\n botonConfirmar.addEventListener('click', () => cerrar(true));\r\n botonCancelar.addEventListener('click', () => cerrar(false));\r\n\r\n if (config.cerrarConFondo) {\r\n fondo.addEventListener('click', (event) => {\r\n if (event.target === fondo) {\r\n cerrar(false);\r\n }\r\n });\r\n }\r\n\r\n document.addEventListener('keydown', onKeyDown);\r\n\r\n if (config.mostrarCancelar) {\r\n acciones.appendChild(botonCancelar);\r\n }\r\n\r\n acciones.appendChild(botonConfirmar);\r\n\r\n modal.appendChild(icono);\r\n modal.appendChild(titulo);\r\n\r\n if (config.mensaje) {\r\n modal.appendChild(mensaje);\r\n }\r\n\r\n modal.appendChild(acciones);\r\n fondo.appendChild(modal);\r\n document.body.appendChild(fondo);\r\n\r\n botonConfirmar.focus();\r\n });\r\n }\r\n\r\n private static obtenerIcono(tipo: TdAlertaTipo): string {\r\n const iconos: Record<TdAlertaTipo, string> = {\r\n exito: '✓',\r\n error: '!',\r\n advertencia: '!',\r\n info: 'i',\r\n pregunta: '?',\r\n };\r\n\r\n return iconos[tipo];\r\n }\r\n\r\n private static inyectarEstilos(): void {\r\n if (document.getElementById(this.estiloId)) return;\r\n\r\n const style = document.createElement('style');\r\n style.id = this.estiloId;\r\n style.textContent = `\r\n .td-alerta-fondo {\r\n position: fixed;\r\n inset: 0;\r\n z-index: 99999;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 1rem;\r\n background: rgba(15, 23, 42, 0.52);\r\n animation: td-alerta-fondo-entrada 160ms ease-out;\r\n }\r\n\r\n .td-alerta-modal {\r\n width: min(100%, 430px);\r\n border-radius: 18px;\r\n background: #ffffff;\r\n padding: 1.75rem;\r\n text-align: center;\r\n box-shadow: 0 22px 70px rgba(15, 23, 42, 0.28);\r\n animation: td-alerta-modal-entrada 180ms ease-out;\r\n font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\r\n }\r\n\r\n .td-alerta-icono {\r\n width: 4.25rem;\r\n height: 4.25rem;\r\n margin: 0 auto 1rem;\r\n border-radius: 999px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n font-size: 2.1rem;\r\n font-weight: 800;\r\n }\r\n\r\n .td-alerta-icono--exito {\r\n color: #16a34a;\r\n background: #dcfce7;\r\n }\r\n\r\n .td-alerta-icono--error {\r\n color: #ef4444;\r\n background: #fee2e2;\r\n }\r\n\r\n .td-alerta-icono--advertencia {\r\n color: #f59e0b;\r\n background: #fef3c7;\r\n }\r\n\r\n .td-alerta-icono--info {\r\n color: #2563eb;\r\n background: #dbeafe;\r\n }\r\n\r\n .td-alerta-icono--pregunta {\r\n color: #7c3aed;\r\n background: #ede9fe;\r\n }\r\n\r\n .td-alerta-titulo {\r\n margin: 0;\r\n color: #111827;\r\n font-size: 1.35rem;\r\n line-height: 1.25;\r\n font-weight: 800;\r\n }\r\n\r\n .td-alerta-mensaje {\r\n margin: 0.75rem 0 0;\r\n color: #4b5563;\r\n font-size: 0.96rem;\r\n line-height: 1.55;\r\n }\r\n\r\n .td-alerta-acciones {\r\n display: flex;\r\n justify-content: center;\r\n gap: 0.75rem;\r\n margin-top: 1.5rem;\r\n }\r\n\r\n .td-alerta-boton {\r\n border: 0;\r\n border-radius: 10px;\r\n padding: 0.7rem 1.2rem;\r\n color: #ffffff;\r\n font-size: 0.93rem;\r\n font-weight: 700;\r\n cursor: pointer;\r\n transition: transform 120ms ease, filter 120ms ease, background 120ms ease;\r\n }\r\n\r\n .td-alerta-boton:hover {\r\n filter: brightness(0.96);\r\n }\r\n\r\n .td-alerta-boton:active {\r\n transform: scale(0.98);\r\n }\r\n\r\n .td-alerta-boton:focus {\r\n outline: 3px solid rgba(37, 99, 235, 0.25);\r\n outline-offset: 2px;\r\n }\r\n\r\n .td-alerta-boton--exito {\r\n background: #22c55e;\r\n }\r\n\r\n .td-alerta-boton--error {\r\n background: #ef4444;\r\n }\r\n\r\n .td-alerta-boton--advertencia {\r\n background: #f59e0b;\r\n }\r\n\r\n .td-alerta-boton--info {\r\n background: #2563eb;\r\n }\r\n\r\n .td-alerta-boton--pregunta {\r\n background: #7c3aed;\r\n }\r\n\r\n .td-alerta-boton--cancelar {\r\n background: #6b7280;\r\n }\r\n\r\n .td-alerta-saliendo {\r\n animation: td-alerta-fondo-salida 140ms ease-in forwards;\r\n }\r\n\r\n .td-alerta-saliendo .td-alerta-modal {\r\n animation: td-alerta-modal-salida 140ms ease-in forwards;\r\n }\r\n\r\n @keyframes td-alerta-fondo-entrada {\r\n from { opacity: 0; }\r\n to { opacity: 1; }\r\n }\r\n\r\n @keyframes td-alerta-modal-entrada {\r\n from {\r\n opacity: 0;\r\n transform: translateY(12px) scale(0.96);\r\n }\r\n to {\r\n opacity: 1;\r\n transform: translateY(0) scale(1);\r\n }\r\n }\r\n\r\n @keyframes td-alerta-fondo-salida {\r\n from { opacity: 1; }\r\n to { opacity: 0; }\r\n }\r\n\r\n @keyframes td-alerta-modal-salida {\r\n from {\r\n opacity: 1;\r\n transform: translateY(0) scale(1);\r\n }\r\n to {\r\n opacity: 0;\r\n transform: translateY(8px) scale(0.97);\r\n }\r\n }\r\n\r\n @media (max-width: 480px) {\r\n .td-alerta-modal {\r\n padding: 1.4rem;\r\n border-radius: 16px;\r\n }\r\n\r\n .td-alerta-acciones {\r\n flex-direction: column-reverse;\r\n }\r\n\r\n .td-alerta-boton {\r\n width: 100%;\r\n }\r\n }\r\n `;\r\n\r\n document.head.appendChild(style);\r\n }\r\n}","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'td-footer',\n templateUrl: './td-footer.html',\n styleUrl: './td-footer.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdFooter {\n @Input() empresa = 'TelcomDev';\n @Input() texto = 'Todos los derechos reservados.';\n @Input() version = '';\n @Input() oscuro = false;\n @Input() compacto = false;\n @Input() anio = new Date().getFullYear();\n}\n","<footer\n class=\"td-footer\"\n [class.td-footer--oscuro]=\"oscuro\"\n [class.td-footer--compacto]=\"compacto\"\n>\n <div class=\"td-footer__identidad\">\n <span>© {{ anio }} {{ empresa }}</span>\n @if (texto) {\n <small>{{ texto }}</small>\n }\n </div>\n\n <nav class=\"td-footer__enlaces\" aria-label=\"Enlaces del pie de página\">\n <ng-content select=\"[tdFooterLinks]\" />\n </nav>\n\n <div class=\"td-footer__final\">\n <ng-content select=\"[tdFooterActions]\" />\n @if (version) {\n <span class=\"td-footer__version\">v{{ version }}</span>\n }\n </div>\n</footer>\n","import { TdIconoDefinicion } from './td-icono.model';\n\nexport const TD_ICONOS = {\n home: {\n path: 'M3 10.5 12 3l9 7.5V21a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1V10.5Z',\n },\n dashboard: {\n path: 'M4 3h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm10 0h6a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm0 8h6a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1ZM4 14h6a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1Z',\n },\n folder: {\n path: 'M3 5a2 2 0 0 1 2-2h5l2 2h7a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Z',\n },\n settings: {\n path: 'M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm8.5 3.5c0-.5-.05-.98-.14-1.45l2.02-1.57-2-3.46-2.47 1a8.7 8.7 0 0 0-2.5-1.45L15 2.5h-4l-.4 2.57a8.7 8.7 0 0 0-2.51 1.45l-2.47-1-2 3.46 2.02 1.57a7.7 7.7 0 0 0 0 2.9l-2.02 1.57 2 3.46 2.47-1a8.7 8.7 0 0 0 2.5 1.45L11 21.5h4l.4-2.57a8.7 8.7 0 0 0 2.51-1.45l2.47 1 2-3.46-2.02-1.57c.09-.47.14-.95.14-1.45Z',\n },\n people: {\n path: 'M16 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM6.5 12a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM16 13c-4 0-7 2-7 4.5V21h14v-3.5C23 15 20 13 16 13ZM6.5 14C2.9 14 1 15.8 1 18v3h6v-3.5c0-1.2.48-2.28 1.3-3.16A9.3 9.3 0 0 0 6.5 14Z',\n },\n person: {\n path: 'M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-5 0-9 2.5-9 5.5V22h18v-2.5c0-3-4-5.5-9-5.5Z',\n },\n security: {\n path: 'M12 2 4 5v6c0 5.05 3.41 9.74 8 11 4.59-1.26 8-5.95 8-11V5l-8-3Zm-1 14-4-4 1.4-1.4 2.6 2.58 5.6-5.58L18 9l-7 7Z',\n },\n inventory: {\n path: 'm12 2 9 5-9 5-9-5 9-5Zm-7 8.5 6 3.33V22l-6-3.33V10.5Zm8 11.5v-8.17l6-3.33v8.17L13 22Z',\n },\n shopping_cart: {\n path: 'M7 18a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm10 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM6.2 6l.8 2h11.6l-1.9 5H8.1L4.3 3H1v2h2l3.6 9.6A2 2 0 0 0 8.5 16H19v-2H8.5l-.4-1H18a2 2 0 0 0 1.86-1.27L22 6H6.2Z',\n },\n receipt: {\n path: 'M5 2v20l3-2 4 2 4-2 3 2V2l-3 2-4-2-4 2-3-2Zm3 6h8v2H8V8Zm0 4h8v2H8v-2Z',\n },\n assessment: {\n path: 'M4 20h16v2H4a2 2 0 0 1-2-2V4h2v16Zm3-2H5v-6h2v6Zm4 0H9V7h2v11Zm4 0h-2V4h2v14Zm4 0h-2v-9h2v9Z',\n },\n description: {\n path: 'M6 2h8l5 5v15H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm7 1.5V8h4.5L13 3.5ZM8 12v2h8v-2H8Zm0 4v2h8v-2H8Z',\n },\n business: {\n path: 'M3 21V3h10v5h8v13h-7v-4h-2v4H3Zm3-14h2V5H6v2Zm4 0h2V5h-2v2Zm-4 4h2V9H6v2Zm4 0h2V9h-2v2Zm6 1h2v-2h-2v2Zm0 4h2v-2h-2v2Z',\n },\n chevron_left: {\n path: 'M14.7 5.3a1 1 0 0 1 0 1.4L9.4 12l5.3 5.3a1 1 0 1 1-1.4 1.4l-6-6a1 1 0 0 1 0-1.4l6-6a1 1 0 0 1 1.4 0Z',\n },\n chevron_right: {\n path: 'M9.3 5.3a1 1 0 0 0 0 1.4l5.3 5.3-5.3 5.3a1 1 0 1 0 1.4 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.4 0Z',\n },\n sun: {\n path: 'M12 7a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0-5a1 1 0 0 1 1 1v2a1 1 0 1 1-2 0V3a1 1 0 0 1 1-1Zm0 17a1 1 0 0 1 1 1v2a1 1 0 1 1-2 0v-2a1 1 0 0 1 1-1ZM2 12a1 1 0 0 1 1-1h2a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1Zm17 0a1 1 0 0 1 1-1h2a1 1 0 1 1 0 2h-2a1 1 0 0 1-1-1ZM4.22 4.22a1 1 0 0 1 1.42 0l1.41 1.42a1 1 0 0 1-1.41 1.41L4.22 5.64a1 1 0 0 1 0-1.42Zm12.73 12.73a1 1 0 0 1 1.41 0l1.42 1.41a1 1 0 0 1-1.42 1.42l-1.41-1.42a1 1 0 0 1 0-1.41Zm2.83-12.73a1 1 0 0 1 0 1.42l-1.42 1.41a1 1 0 0 1-1.41-1.41l1.41-1.42a1 1 0 0 1 1.42 0ZM7.05 16.95a1 1 0 0 1 0 1.41l-1.41 1.42a1 1 0 0 1-1.42-1.42l1.42-1.41a1 1 0 0 1 1.41 0Z',\n },\n moon: {\n path: 'M20.5 15.2A8.5 8.5 0 0 1 8.8 3.5 9 9 0 1 0 20.5 15.2Z',\n },\n alert: {\n path: 'M12 2 1 21h22L12 2Zm-1 7h2v6h-2V9Zm0 8h2v2h-2v-2Z',\n },\n check: {\n path: 'm9.2 16.2-4.4-4.4-1.6 1.6 6 6L21 7.6 19.4 6 9.2 16.2Z',\n },\n close: {\n path: 'M6.4 5 12 10.6 17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4-5.6-5.6L6.4 19 5 17.6l5.6-5.6L5 6.4 6.4 5Z',\n },\n menu: {\n path: 'M3 6h18v2H3V6Zm0 5h18v2H3v-2Zm0 5h18v2H3v-2Z',\n },\n search: {\n path: 'M10.5 3a7.5 7.5 0 1 0 4.73 13.32L20.91 22 22 20.91l-5.68-5.68A7.5 7.5 0 0 0 10.5 3Zm0 2a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11Z',\n },\n notifications: {\n path: 'M12 22a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 22Zm7-6v-5a7 7 0 0 0-5.5-6.84V3a1.5 1.5 0 0 0-3 0v1.16A7 7 0 0 0 5 11v5l-2 2v1h18v-1l-2-2Z',\n },\n chevron_down: {\n path: 'M5.3 8.3a1 1 0 0 1 1.4 0l5.3 5.3 5.3-5.3a1 1 0 1 1 1.4 1.4l-6 6a1 1 0 0 1-1.4 0l-6-6a1 1 0 0 1 0-1.4Z',\n },\n apps: {\n path: 'M4 3h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm12 0h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1ZM4 15h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1Zm12 0h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1Z',\n },\n help: {\n path: 'M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm0-4.5a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5Zm.2-9.5c-2 0-3.37 1.03-3.7 2.75l1.95.4c.17-.84.77-1.3 1.67-1.3 1 0 1.63.52 1.63 1.35 0 .67-.33 1.03-1.27 1.58-1.12.65-1.48 1.27-1.48 2.47V14h2v-.55c0-.67.2-.94 1.12-1.5 1.18-.72 1.88-1.58 1.88-2.9C16 7.25 14.5 6 12.2 6Z',\n },\n} satisfies Record<string, TdIconoDefinicion>;\n\nexport type TdIconoNombre = keyof typeof TD_ICONOS;\n\nexport const TD_ICONOS_NOMBRES = Object.freeze(\n Object.keys(TD_ICONOS) as TdIconoNombre[]\n);\n","import { Injectable } from '@angular/core';\nimport { TdIconoDefinicion, TdIconoPersonalizado } from './td-icono.model';\nimport { TD_ICONOS } from './td-iconos';\n\n@Injectable({ providedIn: 'root' })\nexport class TdIconoRegistry {\n private readonly iconos = new Map<string, TdIconoDefinicion>(\n Object.entries(TD_ICONOS)\n );\n\n registrar(iconos: TdIconoPersonalizado): void {\n for (const [nombre, definicion] of Object.entries(iconos)) {\n const clave = this.normalizar(nombre);\n if (!clave) continue;\n\n this.iconos.set(\n clave,\n typeof definicion === 'string' ? { path: definicion } : definicion\n );\n }\n }\n\n obtener(nombre: string | null | undefined): TdIconoDefinicion {\n return this.iconos.get(this.normalizar(nombre)) ?? this.iconos.get('folder')!;\n }\n\n existe(nombre: string): boolean {\n return this.iconos.has(this.normalizar(nombre));\n }\n\n nombres(): string[] {\n return [...this.iconos.keys()];\n }\n\n private normalizar(nombre: string | null | undefined): string {\n return (nombre ?? '').trim().toLowerCase();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n inject,\n} from '@angular/core';\nimport { TdIconoRegistry } from './td-icono-registry';\n\n@Component({\n selector: 'td-icon',\n template: `\n <svg\n [attr.viewBox]=\"definicion().viewBox || '0 0 24 24'\"\n [attr.aria-hidden]=\"titulo ? null : 'true'\"\n [attr.aria-label]=\"titulo || null\"\n [attr.role]=\"titulo ? 'img' : null\"\n focusable=\"false\"\n >\n <path [attr.d]=\"definicion().path\" />\n </svg>\n `,\n styles: `\n :host {\n display: inline-flex;\n width: var(--td-icon-size, 1.25rem);\n height: var(--td-icon-size, 1.25rem);\n flex: 0 0 auto;\n color: inherit;\n line-height: 0;\n vertical-align: middle;\n }\n svg { width: 100%; height: 100%; fill: currentColor; }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdIcon {\n private readonly registry = inject(TdIconoRegistry);\n\n @Input() nombre = 'folder';\n @Input() titulo = '';\n\n @Input()\n set tamano(value: string | number) {\n this.tamanoCss = typeof value === 'number' ? `${value}px` : value;\n }\n\n protected tamanoCss = '1.25rem';\n\n @HostBinding('style.--td-icon-size')\n protected get tamanoHost(): string {\n return this.tamanoCss;\n }\n\n protected definicion() {\n return this.registry.obtener(this.nombre);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostListener,\n Input,\n Output,\n} from '@angular/core';\nimport { TdIcon } from '../iconos';\n\nexport interface TdHeaderNotificacion {\n id: string | number;\n titulo: string;\n descripcion?: string;\n fecha?: string;\n icono?: string;\n leida?: boolean;\n}\n\nexport type TdHeaderAccionPerfil = 'perfil' | 'configuracion' | 'salir';\n\n@Component({\n selector: 'td-header',\n imports: [TdIcon],\n templateUrl: './td-header.html',\n styleUrl: './td-header.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdHeader {\n @Input() menuAbierto = true;\n @Input() mostrarMenu = true;\n @Input() usuario = '';\n @Input() cargo = '';\n @Input() avatarUrl = '';\n @Input() notificaciones: TdHeaderNotificacion[] = [];\n @Input() oscuro = false;\n @Input() fijo = true;\n\n @Output() readonly menuToggle = new EventEmitter<void>();\n @Output() readonly notificacionSeleccionada = new EventEmitter<TdHeaderNotificacion>();\n @Output() readonly verTodasNotificaciones = new EventEmitter<void>();\n @Output() readonly accionPerfil = new EventEmitter<TdHeaderAccionPerfil>();\n\n protected panelNotificacionesAbierto = false;\n protected panelPerfilAbierto = false;\n\n protected alternarMenu(): void {\n this.menuToggle.emit();\n }\n\n protected alternarNotificaciones(): void {\n this.panelNotificacionesAbierto = !this.panelNotificacionesAbierto;\n this.panelPerfilAbierto = false;\n }\n\n protected alternarPerfil(): void {\n this.panelPerfilAbierto = !this.panelPerfilAbierto;\n this.panelNotificacionesAbierto = false;\n }\n\n protected seleccionarNotificacion(notificacion: TdHeaderNotificacion): void {\n this.notificacionSeleccionada.emit(notificacion);\n this.panelNotificacionesAbierto = false;\n }\n\n protected emitirAccionPerfil(accion: TdHeaderAccionPerfil): void {\n this.accionPerfil.emit(accion);\n this.panelPerfilAbierto = false;\n }\n\n protected notificacionesNoLeidas(): number {\n return this.notificaciones.filter((item) => !item.leida).length;\n }\n\n protected inicialesUsuario(): string {\n const partes = this.usuario.trim().split(/\\s+/).filter(Boolean);\n return (\n partes\n .slice(0, 2)\n .map((parte) => parte.charAt(0))\n .join('') || 'U'\n ).toUpperCase();\n }\n\n @HostListener('document:keydown.escape')\n protected cerrarConEscape(): void {\n this.panelNotificacionesAbierto = false;\n this.panelPerfilAbierto = false;\n }\n}\n","<header\n class=\"td-header\"\n [class.td-header--oscuro]=\"oscuro\"\n [class.td-header--fijo]=\"fijo\"\n>\n <div class=\"td-header__inicio\">\n @if (mostrarMenu) {\n <button\n class=\"td-header__boton td-header__menu\"\n type=\"button\"\n [attr.aria-label]=\"menuAbierto ? 'Cerrar sidebar' : 'Abrir sidebar'\"\n [attr.aria-expanded]=\"menuAbierto\"\n (click)=\"alternarMenu()\"\n >\n <td-icon [nombre]=\"menuAbierto ? 'close' : 'menu'\" />\n </button>\n }\n\n <ng-content select=\"[tdHeaderStart]\" />\n </div>\n\n <div class=\"td-header__centro\">\n <ng-content select=\"[tdHeaderCenter]\" />\n </div>\n\n <div class=\"td-header__acciones\">\n <ng-content select=\"[tdHeaderActions]\" />\n\n <div class=\"td-header__desplegable\">\n <button\n class=\"td-header__boton td-header__notificaciones\"\n type=\"button\"\n aria-label=\"Notificaciones\"\n [attr.aria-expanded]=\"panelNotificacionesAbierto\"\n (click)=\"alternarNotificaciones()\"\n >\n <td-icon nombre=\"notifications\" />\n @if (notificacionesNoLeidas() > 0) {\n <span>{{ notificacionesNoLeidas() > 99 ? '99+' : notificacionesNoLeidas() }}</span>\n }\n </button>\n\n @if (panelNotificacionesAbierto) {\n <section class=\"td-header__panel td-header__panel--notificaciones\">\n <header>\n <div>\n <strong>Notificaciones</strong>\n <small>{{ notificacionesNoLeidas() }} sin leer</small>\n </div>\n <td-icon nombre=\"notifications\" />\n </header>\n\n <div class=\"td-header__lista-notificaciones\">\n @for (notificacion of notificaciones; track notificacion.id) {\n <button\n type=\"button\"\n [class.td-header__notificacion--nueva]=\"!notificacion.leida\"\n (click)=\"seleccionarNotificacion(notificacion)\"\n >\n <span class=\"td-header__notificacion-icono\">\n <td-icon [nombre]=\"notificacion.icono || 'notifications'\" />\n </span>\n <span>\n <strong>{{ notificacion.titulo }}</strong>\n @if (notificacion.descripcion) {\n <small>{{ notificacion.descripcion }}</small>\n }\n @if (notificacion.fecha) {\n <time>{{ notificacion.fecha }}</time>\n }\n </span>\n </button>\n } @empty {\n <p class=\"td-header__vacio\">No tienes notificaciones.</p>\n }\n </div>\n\n @if (notificaciones.length) {\n <button\n class=\"td-header__ver-todas\"\n type=\"button\"\n (click)=\"verTodasNotificaciones.emit(); panelNotificacionesAbierto = false\"\n >\n Ver todas las notificaciones\n </button>\n }\n </section>\n }\n </div>\n\n @if (usuario) {\n <span class=\"td-header__separador\" aria-hidden=\"true\"></span>\n\n <div class=\"td-header__desplegable\">\n <button\n class=\"td-header__perfil\"\n type=\"button\"\n aria-label=\"Abrir perfil de usuario\"\n [attr.aria-expanded]=\"panelPerfilAbierto\"\n (click)=\"alternarPerfil()\"\n >\n <span class=\"td-header__avatar\">\n @if (avatarUrl) {\n <img [src]=\"avatarUrl\" [alt]=\"usuario\" />\n } @else {\n {{ inicialesUsuario() }}\n }\n </span>\n <span class=\"td-header__usuario\">\n <strong>{{ usuario }}</strong>\n @if (cargo) {\n <small>{{ cargo }}</small>\n }\n </span>\n <td-icon nombre=\"chevron_down\" tamano=\"0.85rem\" />\n </button>\n\n @if (panelPerfilAbierto) {\n <section class=\"td-header__panel td-header__panel--perfil\">\n <div class=\"td-header__perfil-resumen\">\n <span class=\"td-header__avatar td-header__avatar--grande\">{{ inicialesUsuario() }}</span>\n <div>\n <strong>{{ usuario }}</strong>\n <small>{{ cargo || 'Usuario' }}</small>\n </div>\n </div>\n <div class=\"td-header__perfil-opciones\">\n <button type=\"button\" (click)=\"emitirAccionPerfil('perfil')\">\n <td-icon nombre=\"person\" /> Mi perfil\n </button>\n <button type=\"button\" (click)=\"emitirAccionPerfil('configuracion')\">\n <td-icon nombre=\"settings\" /> Configuración\n </button>\n <button class=\"td-header__salir\" type=\"button\" (click)=\"emitirAccionPerfil('salir')\">\n <td-icon nombre=\"close\" /> Cerrar sesión\n </button>\n </div>\n </section>\n }\n </div>\n }\n </div>\n</header>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n signal,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { TdIcon } from '../iconos';\nimport { MenuSidebar, TdSidebarSeleccion } from './menu-sidebar';\n\nexport type TdSidebarModoCerrado = 'compacto' | 'oculto';\n\n@Component({\n selector: 'td-sidebar',\n imports: [NgTemplateOutlet, RouterLink, RouterLinkActive, TdIcon],\n templateUrl: './td-sidebar.html',\n styleUrl: './td-sidebar.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdSidebar {\n @Input() titulo = 'Gestión Corporativa';\n @Input() subtitulo = 'Central Platform';\n @Input() etiquetaNavegacion = 'Navegación';\n @Input() logoUrl = '';\n @Input() logoAlt = 'Logo';\n @Input() textoCarga = 'Cargando menú...';\n @Input() mensajeVacio = 'No hay opciones disponibles.';\n @Input() error = '';\n @Input() cargando = false;\n @Input() oscuro = false;\n @Input() modoCerrado: TdSidebarModoCerrado = 'compacto';\n\n @Input()\n set abierto(value: boolean) {\n this.abiertoInterno.set(value);\n }\n get abierto(): boolean {\n return this.abiertoInterno();\n }\n\n @Input()\n set menu(value: MenuSidebar[] | null | undefined) {\n this.menuNormalizado.set(this.normalizarMenu(value ?? []));\n }\n get menu(): MenuSidebar[] {\n return this.menuNormalizado();\n }\n\n @Output() readonly abiertoChange = new EventEmitter<boolean>();\n @Output() readonly seleccionar = new EventEmitter<TdSidebarSeleccion>();\n\n protected readonly abiertoInterno = signal(true);\n protected readonly menuNormalizado = signal<MenuSidebar[]>([]);\n protected readonly expandidos = signal<ReadonlySet<string>>(new Set<string>());\n\n protected alternarGrupo(clave: string): void {\n if (!this.abiertoInterno()) {\n this.abiertoInterno.set(true);\n this.abiertoChange.emit(true);\n }\n\n this.expandidos.update((actuales) => {\n const siguientes = new Set(actuales);\n siguientes.has(clave) ? siguientes.delete(clave) : siguientes.add(clave);\n return siguientes;\n });\n }\n\n protected estaExpandido(clave: string): boolean {\n return this.expandidos().has(clave);\n }\n\n protected seleccionarItem(item: MenuSidebar, nivel: number): void {\n this.seleccionar.emit({ item, nivel });\n }\n\n protected claveItem(item: MenuSidebar, padre: string, indice: number): string {\n return `${padre}/${item.nombre}-${indice}`;\n }\n\n protected inicialMarca(): string {\n return (this.titulo.trim().charAt(0) || 'T').toUpperCase();\n }\n\n private normalizarMenu(items: MenuSidebar[]): MenuSidebar[] {\n return [...items]\n .sort((a, b) => a.orden - b.orden)\n .map((item) => ({\n ...item,\n icono: item.icono?.trim() || 'folder',\n subMenus: this.normalizarMenu(item.subMenus ?? []),\n }));\n }\n}\n","<aside\n class=\"td-sidebar\"\n [class.td-sidebar--compacto]=\"!abiertoInterno() && modoCerrado === 'compacto'\"\n [class.td-sidebar--oculto]=\"!abiertoInterno() && modoCerrado === 'oculto'\"\n [class.td-sidebar--oscuro]=\"oscuro\"\n [attr.aria-hidden]=\"!abiertoInterno() && modoCerrado === 'oculto'\"\n>\n <header class=\"td-sidebar__marca\">\n <div class=\"td-sidebar__logo\">\n @if (logoUrl) {\n <img [src]=\"logoUrl\" [alt]=\"logoAlt\" />\n } @else {\n <span>{{ inicialMarca() }}</span>\n }\n </div>\n\n @if (abiertoInterno()) {\n <div class=\"td-sidebar__marca-texto\">\n <small>{{ subtitulo }}</small>\n <strong>{{ titulo }}</strong>\n </div>\n }\n\n </header>\n\n <div class=\"td-sidebar__encabezado\">\n @if (abiertoInterno()) {\n <span>{{ etiquetaNavegacion }}</span>\n } @else {\n <span aria-hidden=\"true\">•••</span>\n }\n </div>\n\n <nav class=\"td-sidebar__nav\" aria-label=\"Menú principal\">\n @if (cargando) {\n <p class=\"td-sidebar__estado\">{{ textoCarga }}</p>\n } @else if (error) {\n <p class=\"td-sidebar__estado td-sidebar__estado--error\">{{ error }}</p>\n } @else if (!menuNormalizado().length) {\n <p class=\"td-sidebar__estado\">{{ mensajeVacio }}</p>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"listaMenu\"\n [ngTemplateOutletContext]=\"{ items: menuNormalizado(), nivel: 0, padre: 'raiz' }\"\n />\n }\n </nav>\n</aside>\n\n<ng-template #listaMenu let-items=\"items\" let-nivel=\"nivel\" let-padre=\"padre\">\n <ul class=\"td-sidebar__lista\" [class.td-sidebar__lista--anidada]=\"nivel > 0\">\n @for (item of items; track item) {\n @let clave = claveItem(item, padre, $index);\n @let tieneHijos = item.subMenus.length > 0;\n\n <li class=\"td-sidebar__item\">\n @if (tieneHijos) {\n <button\n class=\"td-sidebar__enlace\"\n type=\"button\"\n [class.td-sidebar__enlace--activo]=\"estaExpandido(clave)\"\n [attr.aria-expanded]=\"estaExpandido(clave)\"\n [attr.title]=\"!abiertoInterno() ? item.nombre : null\"\n (click)=\"alternarGrupo(clave)\"\n >\n <td-icon class=\"td-sidebar__icono\" [nombre]=\"item.icono || 'folder'\" />\n @if (abiertoInterno()) {\n <span>{{ item.nombre }}</span>\n <td-icon\n class=\"td-sidebar__flecha\"\n [class.td-sidebar__flecha--abierta]=\"estaExpandido(clave)\"\n nombre=\"chevron_right\"\n />\n }\n </button>\n } @else {\n <a\n class=\"td-sidebar__enlace\"\n [routerLink]=\"item.ruta || '/'\"\n routerLinkActive=\"td-sidebar__enlace--ruta-activa\"\n [routerLinkActiveOptions]=\"{ exact: item.ruta === '/' }\"\n [attr.title]=\"!abiertoInterno() ? item.nombre : null\"\n (click)=\"seleccionarItem(item, nivel)\"\n >\n <td-icon class=\"td-sidebar__icono\" [nombre]=\"item.icono || 'folder'\" />\n @if (abiertoInterno()) {\n <span>{{ item.nombre }}</span>\n }\n </a>\n }\n\n @if (abiertoInterno() && tieneHijos && estaExpandido(clave)) {\n <ng-container\n [ngTemplateOutlet]=\"listaMenu\"\n [ngTemplateOutletContext]=\"{\n items: item.subMenus,\n nivel: nivel + 1,\n padre: clave\n }\"\n />\n }\n </li>\n }\n </ul>\n</ng-template>\n","/*\n * Public API Surface of telcomdev-ui\n */\n\nexport * from './lib/telcomdev-ui';\nexport * from './lib/alerta';\nexport * from './lib/footer';\nexport * from './lib/header';\nexport * from './lib/iconos';\nexport * from './lib/sidebar';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAQa,WAAW,CAAA;wGAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,WAAW,2EAHZ,CAAA,4BAAA,CAA8B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAG7B,WAAW,EAAA,UAAA,EAAA,CAAA;kBANvB,SAAS;+BACE,iBAAiB,EAAA,OAAA,EAClB,EAAE,EAAA,QAAA,EACD,CAAA,4BAAA,CAA8B,EAAA;;;MCQ7B,QAAQ,CAAA;AACX,IAAA,OAAgB,QAAQ,GAAG,mBAAmB;AAEtD,IAAA,OAAO,KAAK,CAAC,OAAe,EAAE,MAAM,GAAG,qBAAqB,EAAA;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,MAAM;YACN,OAAO;AACP,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,cAAc,EAAE,SAAS;AAC1B,SAAA,CAAC;IACJ;AAEA,IAAA,OAAO,KAAK,CAAC,OAAe,EAAE,MAAM,GAAG,SAAS,EAAA;QAC9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H;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telcomdev/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Librería UI reutilizable para los sistemas TelcomDev.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
"components",
|
|
9
9
|
"telcomdev",
|
|
10
10
|
"alerts",
|
|
11
|
-
"sidebar"
|
|
11
|
+
"sidebar",
|
|
12
|
+
"header",
|
|
13
|
+
"footer",
|
|
14
|
+
"icons"
|
|
12
15
|
],
|
|
13
16
|
"author": "TelcomDev",
|
|
14
17
|
"license": "MIT",
|
package/types/telcomdev-ui.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import * as _telcomdev_ui from '@telcomdev/ui';
|
|
3
4
|
|
|
4
5
|
declare class TelcomdevUi {
|
|
5
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<TelcomdevUi, never>;
|
|
@@ -31,6 +32,165 @@ declare class TdAlerta {
|
|
|
31
32
|
private static inyectarEstilos;
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
declare class TdFooter {
|
|
36
|
+
empresa: string;
|
|
37
|
+
texto: string;
|
|
38
|
+
version: string;
|
|
39
|
+
oscuro: boolean;
|
|
40
|
+
compacto: boolean;
|
|
41
|
+
anio: number;
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TdFooter, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TdFooter, "td-footer", never, { "empresa": { "alias": "empresa"; "required": false; }; "texto": { "alias": "texto"; "required": false; }; "version": { "alias": "version"; "required": false; }; "oscuro": { "alias": "oscuro"; "required": false; }; "compacto": { "alias": "compacto"; "required": false; }; "anio": { "alias": "anio"; "required": false; }; }, {}, never, ["[tdFooterLinks]", "[tdFooterActions]"], true, never>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface TdHeaderNotificacion {
|
|
47
|
+
id: string | number;
|
|
48
|
+
titulo: string;
|
|
49
|
+
descripcion?: string;
|
|
50
|
+
fecha?: string;
|
|
51
|
+
icono?: string;
|
|
52
|
+
leida?: boolean;
|
|
53
|
+
}
|
|
54
|
+
type TdHeaderAccionPerfil = 'perfil' | 'configuracion' | 'salir';
|
|
55
|
+
declare class TdHeader {
|
|
56
|
+
menuAbierto: boolean;
|
|
57
|
+
mostrarMenu: boolean;
|
|
58
|
+
usuario: string;
|
|
59
|
+
cargo: string;
|
|
60
|
+
avatarUrl: string;
|
|
61
|
+
notificaciones: TdHeaderNotificacion[];
|
|
62
|
+
oscuro: boolean;
|
|
63
|
+
fijo: boolean;
|
|
64
|
+
readonly menuToggle: EventEmitter<void>;
|
|
65
|
+
readonly notificacionSeleccionada: EventEmitter<TdHeaderNotificacion>;
|
|
66
|
+
readonly verTodasNotificaciones: EventEmitter<void>;
|
|
67
|
+
readonly accionPerfil: EventEmitter<TdHeaderAccionPerfil>;
|
|
68
|
+
protected panelNotificacionesAbierto: boolean;
|
|
69
|
+
protected panelPerfilAbierto: boolean;
|
|
70
|
+
protected alternarMenu(): void;
|
|
71
|
+
protected alternarNotificaciones(): void;
|
|
72
|
+
protected alternarPerfil(): void;
|
|
73
|
+
protected seleccionarNotificacion(notificacion: TdHeaderNotificacion): void;
|
|
74
|
+
protected emitirAccionPerfil(accion: TdHeaderAccionPerfil): void;
|
|
75
|
+
protected notificacionesNoLeidas(): number;
|
|
76
|
+
protected inicialesUsuario(): string;
|
|
77
|
+
protected cerrarConEscape(): void;
|
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TdHeader, never>;
|
|
79
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TdHeader, "td-header", never, { "menuAbierto": { "alias": "menuAbierto"; "required": false; }; "mostrarMenu": { "alias": "mostrarMenu"; "required": false; }; "usuario": { "alias": "usuario"; "required": false; }; "cargo": { "alias": "cargo"; "required": false; }; "avatarUrl": { "alias": "avatarUrl"; "required": false; }; "notificaciones": { "alias": "notificaciones"; "required": false; }; "oscuro": { "alias": "oscuro"; "required": false; }; "fijo": { "alias": "fijo"; "required": false; }; }, { "menuToggle": "menuToggle"; "notificacionSeleccionada": "notificacionSeleccionada"; "verTodasNotificaciones": "verTodasNotificaciones"; "accionPerfil": "accionPerfil"; }, never, ["[tdHeaderStart]", "[tdHeaderCenter]", "[tdHeaderActions]"], true, never>;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
declare class TdIcon {
|
|
83
|
+
private readonly registry;
|
|
84
|
+
nombre: string;
|
|
85
|
+
titulo: string;
|
|
86
|
+
set tamano(value: string | number);
|
|
87
|
+
protected tamanoCss: string;
|
|
88
|
+
protected get tamanoHost(): string;
|
|
89
|
+
protected definicion(): _telcomdev_ui.TdIconoDefinicion;
|
|
90
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TdIcon, never>;
|
|
91
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TdIcon, "td-icon", never, { "nombre": { "alias": "nombre"; "required": false; }; "titulo": { "alias": "titulo"; "required": false; }; "tamano": { "alias": "tamano"; "required": false; }; }, {}, never, never, true, never>;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface TdIconoDefinicion {
|
|
95
|
+
path: string;
|
|
96
|
+
viewBox?: string;
|
|
97
|
+
}
|
|
98
|
+
type TdIconoPersonalizado = Record<string, string | TdIconoDefinicion>;
|
|
99
|
+
|
|
100
|
+
declare class TdIconoRegistry {
|
|
101
|
+
private readonly iconos;
|
|
102
|
+
registrar(iconos: TdIconoPersonalizado): void;
|
|
103
|
+
obtener(nombre: string | null | undefined): TdIconoDefinicion;
|
|
104
|
+
existe(nombre: string): boolean;
|
|
105
|
+
nombres(): string[];
|
|
106
|
+
private normalizar;
|
|
107
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TdIconoRegistry, never>;
|
|
108
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TdIconoRegistry>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
declare const TD_ICONOS: {
|
|
112
|
+
home: {
|
|
113
|
+
path: string;
|
|
114
|
+
};
|
|
115
|
+
dashboard: {
|
|
116
|
+
path: string;
|
|
117
|
+
};
|
|
118
|
+
folder: {
|
|
119
|
+
path: string;
|
|
120
|
+
};
|
|
121
|
+
settings: {
|
|
122
|
+
path: string;
|
|
123
|
+
};
|
|
124
|
+
people: {
|
|
125
|
+
path: string;
|
|
126
|
+
};
|
|
127
|
+
person: {
|
|
128
|
+
path: string;
|
|
129
|
+
};
|
|
130
|
+
security: {
|
|
131
|
+
path: string;
|
|
132
|
+
};
|
|
133
|
+
inventory: {
|
|
134
|
+
path: string;
|
|
135
|
+
};
|
|
136
|
+
shopping_cart: {
|
|
137
|
+
path: string;
|
|
138
|
+
};
|
|
139
|
+
receipt: {
|
|
140
|
+
path: string;
|
|
141
|
+
};
|
|
142
|
+
assessment: {
|
|
143
|
+
path: string;
|
|
144
|
+
};
|
|
145
|
+
description: {
|
|
146
|
+
path: string;
|
|
147
|
+
};
|
|
148
|
+
business: {
|
|
149
|
+
path: string;
|
|
150
|
+
};
|
|
151
|
+
chevron_left: {
|
|
152
|
+
path: string;
|
|
153
|
+
};
|
|
154
|
+
chevron_right: {
|
|
155
|
+
path: string;
|
|
156
|
+
};
|
|
157
|
+
sun: {
|
|
158
|
+
path: string;
|
|
159
|
+
};
|
|
160
|
+
moon: {
|
|
161
|
+
path: string;
|
|
162
|
+
};
|
|
163
|
+
alert: {
|
|
164
|
+
path: string;
|
|
165
|
+
};
|
|
166
|
+
check: {
|
|
167
|
+
path: string;
|
|
168
|
+
};
|
|
169
|
+
close: {
|
|
170
|
+
path: string;
|
|
171
|
+
};
|
|
172
|
+
menu: {
|
|
173
|
+
path: string;
|
|
174
|
+
};
|
|
175
|
+
search: {
|
|
176
|
+
path: string;
|
|
177
|
+
};
|
|
178
|
+
notifications: {
|
|
179
|
+
path: string;
|
|
180
|
+
};
|
|
181
|
+
chevron_down: {
|
|
182
|
+
path: string;
|
|
183
|
+
};
|
|
184
|
+
apps: {
|
|
185
|
+
path: string;
|
|
186
|
+
};
|
|
187
|
+
help: {
|
|
188
|
+
path: string;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
type TdIconoNombre = keyof typeof TD_ICONOS;
|
|
192
|
+
declare const TD_ICONOS_NOMBRES: readonly ("menu" | "search" | "close" | "home" | "dashboard" | "folder" | "settings" | "people" | "person" | "security" | "inventory" | "shopping_cart" | "receipt" | "assessment" | "description" | "business" | "chevron_left" | "chevron_right" | "sun" | "moon" | "alert" | "check" | "notifications" | "chevron_down" | "apps" | "help")[];
|
|
193
|
+
|
|
34
194
|
interface MenuSidebar {
|
|
35
195
|
nombre: string;
|
|
36
196
|
ruta: string | null;
|
|
@@ -43,6 +203,7 @@ interface TdSidebarSeleccion {
|
|
|
43
203
|
nivel: number;
|
|
44
204
|
}
|
|
45
205
|
|
|
206
|
+
type TdSidebarModoCerrado = 'compacto' | 'oculto';
|
|
46
207
|
declare class TdSidebar {
|
|
47
208
|
titulo: string;
|
|
48
209
|
subtitulo: string;
|
|
@@ -54,6 +215,7 @@ declare class TdSidebar {
|
|
|
54
215
|
error: string;
|
|
55
216
|
cargando: boolean;
|
|
56
217
|
oscuro: boolean;
|
|
218
|
+
modoCerrado: TdSidebarModoCerrado;
|
|
57
219
|
set abierto(value: boolean);
|
|
58
220
|
get abierto(): boolean;
|
|
59
221
|
set menu(value: MenuSidebar[] | null | undefined);
|
|
@@ -63,17 +225,15 @@ declare class TdSidebar {
|
|
|
63
225
|
protected readonly abiertoInterno: i0.WritableSignal<boolean>;
|
|
64
226
|
protected readonly menuNormalizado: i0.WritableSignal<MenuSidebar[]>;
|
|
65
227
|
protected readonly expandidos: i0.WritableSignal<ReadonlySet<string>>;
|
|
66
|
-
protected alternarSidebar(): void;
|
|
67
228
|
protected alternarGrupo(clave: string): void;
|
|
68
229
|
protected estaExpandido(clave: string): boolean;
|
|
69
230
|
protected seleccionarItem(item: MenuSidebar, nivel: number): void;
|
|
70
231
|
protected claveItem(item: MenuSidebar, padre: string, indice: number): string;
|
|
71
232
|
protected inicialMarca(): string;
|
|
72
|
-
protected iconoPath(icono: string | null): string;
|
|
73
233
|
private normalizarMenu;
|
|
74
234
|
static ɵfac: i0.ɵɵFactoryDeclaration<TdSidebar, never>;
|
|
75
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TdSidebar, "td-sidebar", never, { "titulo": { "alias": "titulo"; "required": false; }; "subtitulo": { "alias": "subtitulo"; "required": false; }; "etiquetaNavegacion": { "alias": "etiquetaNavegacion"; "required": false; }; "logoUrl": { "alias": "logoUrl"; "required": false; }; "logoAlt": { "alias": "logoAlt"; "required": false; }; "textoCarga": { "alias": "textoCarga"; "required": false; }; "mensajeVacio": { "alias": "mensajeVacio"; "required": false; }; "error": { "alias": "error"; "required": false; }; "cargando": { "alias": "cargando"; "required": false; }; "oscuro": { "alias": "oscuro"; "required": false; }; "abierto": { "alias": "abierto"; "required": false; }; "menu": { "alias": "menu"; "required": false; }; }, { "abiertoChange": "abiertoChange"; "seleccionar": "seleccionar"; }, never, never, true, never>;
|
|
235
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TdSidebar, "td-sidebar", never, { "titulo": { "alias": "titulo"; "required": false; }; "subtitulo": { "alias": "subtitulo"; "required": false; }; "etiquetaNavegacion": { "alias": "etiquetaNavegacion"; "required": false; }; "logoUrl": { "alias": "logoUrl"; "required": false; }; "logoAlt": { "alias": "logoAlt"; "required": false; }; "textoCarga": { "alias": "textoCarga"; "required": false; }; "mensajeVacio": { "alias": "mensajeVacio"; "required": false; }; "error": { "alias": "error"; "required": false; }; "cargando": { "alias": "cargando"; "required": false; }; "oscuro": { "alias": "oscuro"; "required": false; }; "modoCerrado": { "alias": "modoCerrado"; "required": false; }; "abierto": { "alias": "abierto"; "required": false; }; "menu": { "alias": "menu"; "required": false; }; }, { "abiertoChange": "abiertoChange"; "seleccionar": "seleccionar"; }, never, never, true, never>;
|
|
76
236
|
}
|
|
77
237
|
|
|
78
|
-
export { TdAlerta, TdSidebar, TelcomdevUi };
|
|
79
|
-
export type { MenuSidebar, TdAlertaOpciones, TdAlertaTipo, TdSidebarSeleccion };
|
|
238
|
+
export { TD_ICONOS, TD_ICONOS_NOMBRES, TdAlerta, TdFooter, TdHeader, TdIcon, TdIconoRegistry, TdSidebar, TelcomdevUi };
|
|
239
|
+
export type { MenuSidebar, TdAlertaOpciones, TdAlertaTipo, TdHeaderAccionPerfil, TdHeaderNotificacion, TdIconoDefinicion, TdIconoNombre, TdIconoPersonalizado, TdSidebarModoCerrado, TdSidebarSeleccion };
|