ng-comps 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +62 -0
- package/fesm2022/ng-comps.mjs +2479 -0
- package/fesm2022/ng-comps.mjs.map +1 -0
- package/package.json +45 -0
- package/src/styles.css +182 -0
- package/src/theme/material-theme.scss +40 -0
- package/src/theme/tokens.css +107 -0
- package/types/ng-comps.d.ts +917 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
|
|
3
|
+
// ── Fuentes ───────────────────────────────────────────────────────────────────
|
|
4
|
+
// Se incluyen aquí para que Compodoc y el build las encuentren una sola vez.
|
|
5
|
+
// En producción podrías cargarlas desde un CDN en index.html.
|
|
6
|
+
|
|
7
|
+
// ── Paleta personalizada (primary = teal-700) ─────────────────────────────────
|
|
8
|
+
$mf-primary-palette: mat.m2-define-palette(mat.$m2-teal-palette, 700, 300, 900);
|
|
9
|
+
$mf-accent-palette: mat.m2-define-palette(mat.$m2-amber-palette, 500, 200, 700);
|
|
10
|
+
$mf-warn-palette: mat.m2-define-palette(mat.$m2-red-palette);
|
|
11
|
+
|
|
12
|
+
// ── Tipografía ────────────────────────────────────────────────────────────────
|
|
13
|
+
$mf-typography: mat.m2-define-typography-config(
|
|
14
|
+
$font-family: "'Manrope', 'Segoe UI', system-ui, sans-serif",
|
|
15
|
+
$headline-1: mat.m2-define-typography-level(3rem, 3.5rem, 700),
|
|
16
|
+
$headline-2: mat.m2-define-typography-level(2rem, 2.5rem, 700),
|
|
17
|
+
$headline-3: mat.m2-define-typography-level(1.5rem, 2rem, 700),
|
|
18
|
+
$headline-4: mat.m2-define-typography-level(1.25rem, 1.75rem, 700),
|
|
19
|
+
$body-1: mat.m2-define-typography-level(1rem, 1.5rem, 400),
|
|
20
|
+
$body-2: mat.m2-define-typography-level(0.875rem, 1.375rem, 400),
|
|
21
|
+
$button: mat.m2-define-typography-level(0.875rem, 1rem, 700, "'Manrope', 'Segoe UI', sans-serif", 0.01em),
|
|
22
|
+
$caption: mat.m2-define-typography-level(0.75rem, 1.25rem, 400),
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
// ── Tema claro ────────────────────────────────────────────────────────────────
|
|
26
|
+
$mf-theme: mat.m2-define-light-theme((
|
|
27
|
+
color: (
|
|
28
|
+
primary: $mf-primary-palette,
|
|
29
|
+
accent: $mf-accent-palette,
|
|
30
|
+
warn: $mf-warn-palette,
|
|
31
|
+
),
|
|
32
|
+
typography: $mf-typography,
|
|
33
|
+
density: 0,
|
|
34
|
+
));
|
|
35
|
+
|
|
36
|
+
// ── Emitir estilos base de Material ──────────────────────────────────────────
|
|
37
|
+
// Solo se incluye core aquí; cada componente incluye sus propios estilos
|
|
38
|
+
// en el bundle del componente via `@use '@angular/material' as mat`.
|
|
39
|
+
@include mat.core();
|
|
40
|
+
@include mat.all-component-themes($mf-theme);
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MF Components Design Tokens
|
|
3
|
+
* Tokens de diseño centralizados para la librería.
|
|
4
|
+
* Estos tokens son la fuente única de verdad para colores, tipografía,
|
|
5
|
+
* radios y elevaciones. Los componentes deben usar siempre estas variables.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
/* ── Paleta de color ─────────────────────────────────────────── */
|
|
10
|
+
--mf-color-primary-50: #f0fdfa;
|
|
11
|
+
--mf-color-primary-100: #ccfbf1;
|
|
12
|
+
--mf-color-primary-200: #99f6e4;
|
|
13
|
+
--mf-color-primary-300: #5eead4;
|
|
14
|
+
--mf-color-primary-400: #2dd4bf;
|
|
15
|
+
--mf-color-primary-500: #14b8a6;
|
|
16
|
+
--mf-color-primary-600: #0d9488;
|
|
17
|
+
--mf-color-primary-700: #0f766e; /* default */
|
|
18
|
+
--mf-color-primary-800: #115e59;
|
|
19
|
+
--mf-color-primary-900: #134e4a;
|
|
20
|
+
|
|
21
|
+
--mf-color-secondary-50: #eff6ff;
|
|
22
|
+
--mf-color-secondary-100: #dbeafe;
|
|
23
|
+
--mf-color-secondary-200: #bfdbfe;
|
|
24
|
+
--mf-color-secondary-500: #3b82f6;
|
|
25
|
+
--mf-color-secondary-700: #1d4ed8;
|
|
26
|
+
--mf-color-secondary-900: #0b3d5c;
|
|
27
|
+
|
|
28
|
+
--mf-color-accent-300: #fde68a;
|
|
29
|
+
--mf-color-accent-400: #fbbf24;
|
|
30
|
+
--mf-color-accent-500: #f59e0b; /* default */
|
|
31
|
+
--mf-color-accent-700: #b45309;
|
|
32
|
+
|
|
33
|
+
--mf-color-error-500: #ef4444;
|
|
34
|
+
--mf-color-error-700: #b91c1c;
|
|
35
|
+
|
|
36
|
+
--mf-color-neutral-0: #ffffff;
|
|
37
|
+
--mf-color-neutral-50: #f7fafc;
|
|
38
|
+
--mf-color-neutral-100: #f1f5f9;
|
|
39
|
+
--mf-color-neutral-200: #e2e8f0;
|
|
40
|
+
--mf-color-neutral-300: #cbd5e1;
|
|
41
|
+
--mf-color-neutral-400: #94a3b8;
|
|
42
|
+
--mf-color-neutral-600: #475569;
|
|
43
|
+
--mf-color-neutral-800: #1e293b;
|
|
44
|
+
--mf-color-neutral-900: #0f1722;
|
|
45
|
+
|
|
46
|
+
/* ── Semánticos ──────────────────────────────────────────────── */
|
|
47
|
+
--mf-color-brand: var(--mf-color-primary-700);
|
|
48
|
+
--mf-color-brand-hover: var(--mf-color-primary-800);
|
|
49
|
+
--mf-color-brand-light: var(--mf-color-primary-50);
|
|
50
|
+
--mf-color-on-brand: #f8fffd;
|
|
51
|
+
--mf-color-on-surface: var(--mf-color-neutral-800);
|
|
52
|
+
--mf-color-surface: var(--mf-color-neutral-0);
|
|
53
|
+
--mf-color-surface-raised: var(--mf-color-neutral-50);
|
|
54
|
+
--mf-color-border: var(--mf-color-neutral-200);
|
|
55
|
+
|
|
56
|
+
/* ── Tipografía ─────────────────────────────────────────────── */
|
|
57
|
+
--mf-font-base: 'Manrope', 'Segoe UI', system-ui, sans-serif;
|
|
58
|
+
--mf-font-display: 'Sora', 'Segoe UI', system-ui, sans-serif;
|
|
59
|
+
--mf-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
|
|
60
|
+
|
|
61
|
+
--mf-text-xs: 0.75rem;
|
|
62
|
+
--mf-text-sm: 0.875rem;
|
|
63
|
+
--mf-text-base: 1rem;
|
|
64
|
+
--mf-text-lg: 1.125rem;
|
|
65
|
+
--mf-text-xl: 1.25rem;
|
|
66
|
+
--mf-text-2xl: 1.5rem;
|
|
67
|
+
--mf-text-3xl: 1.875rem;
|
|
68
|
+
|
|
69
|
+
--mf-weight-regular: 400;
|
|
70
|
+
--mf-weight-medium: 500;
|
|
71
|
+
--mf-weight-bold: 700;
|
|
72
|
+
|
|
73
|
+
--mf-leading-tight: 1.25;
|
|
74
|
+
--mf-leading-normal: 1.5;
|
|
75
|
+
--mf-leading-loose: 1.75;
|
|
76
|
+
|
|
77
|
+
/* ── Espaciado ──────────────────────────────────────────────── */
|
|
78
|
+
--mf-space-1: 0.25rem;
|
|
79
|
+
--mf-space-2: 0.5rem;
|
|
80
|
+
--mf-space-3: 0.75rem;
|
|
81
|
+
--mf-space-4: 1rem;
|
|
82
|
+
--mf-space-5: 1.25rem;
|
|
83
|
+
--mf-space-6: 1.5rem;
|
|
84
|
+
--mf-space-8: 2rem;
|
|
85
|
+
--mf-space-10: 2.5rem;
|
|
86
|
+
--mf-space-12: 3rem;
|
|
87
|
+
--mf-space-16: 4rem;
|
|
88
|
+
|
|
89
|
+
/* ── Radios ──────────────────────────────────────────────────── */
|
|
90
|
+
--mf-radius-sm: 6px;
|
|
91
|
+
--mf-radius-md: 10px;
|
|
92
|
+
--mf-radius-lg: 16px;
|
|
93
|
+
--mf-radius-xl: 20px;
|
|
94
|
+
--mf-radius-full: 9999px;
|
|
95
|
+
|
|
96
|
+
/* ── Elevación / sombra ─────────────────────────────────────── */
|
|
97
|
+
--mf-shadow-none: none;
|
|
98
|
+
--mf-shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.06);
|
|
99
|
+
--mf-shadow-md: 0 4px 12px 0 rgb(15 23 42 / 0.08), 0 1px 3px 0 rgb(15 23 42 / 0.04);
|
|
100
|
+
--mf-shadow-lg: 0 10px 24px 0 rgb(15 23 42 / 0.10), 0 2px 6px 0 rgb(15 23 42 / 0.06);
|
|
101
|
+
|
|
102
|
+
/* ── Transiciones ────────────────────────────────────────────── */
|
|
103
|
+
--mf-duration-fast: 120ms;
|
|
104
|
+
--mf-duration-base: 200ms;
|
|
105
|
+
--mf-duration-slow: 350ms;
|
|
106
|
+
--mf-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
107
|
+
}
|