@cuencor/styles 0.0.1

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/_tables.scss ADDED
@@ -0,0 +1,206 @@
1
+ /* ── Tables ─────────────────────────────────────────────────────────────── */
2
+
3
+ .fn-table-wrapper {
4
+ width: 100%;
5
+ overflow-x: auto;
6
+ border: 1px solid var(--fn-gray-200);
7
+ border-radius: var(--fn-radius-lg);
8
+ background: #fff;
9
+ box-shadow: var(--fn-shadow-sm);
10
+ }
11
+
12
+ .fn-table {
13
+ width: 100%;
14
+ border-collapse: collapse;
15
+ font-size: var(--fn-text-sm);
16
+
17
+ thead {
18
+ background: var(--fn-gray-50);
19
+ border-bottom: 1px solid var(--fn-gray-200);
20
+ }
21
+
22
+ th {
23
+ padding: 10px 16px;
24
+ font-size: var(--fn-text-xs);
25
+ font-weight: 700;
26
+ color: var(--fn-gray-500);
27
+ text-align: left;
28
+ text-transform: uppercase;
29
+ letter-spacing: 0.05em;
30
+ white-space: nowrap;
31
+ user-select: none;
32
+ }
33
+
34
+ td {
35
+ padding: 12px 16px;
36
+ color: var(--fn-gray-700);
37
+ border-bottom: 1px solid var(--fn-gray-100);
38
+ vertical-align: middle;
39
+ }
40
+
41
+ tbody tr {
42
+ transition: background var(--fn-transition);
43
+
44
+ &:last-child td { border-bottom: none; }
45
+ &:hover { background: var(--fn-gray-50); }
46
+ }
47
+
48
+ /* Modifiers */
49
+ &--striped tbody tr:nth-child(even) { background: var(--fn-gray-50); }
50
+ &--compact { th, td { padding: 8px 12px; } }
51
+ &--bordered td, &--bordered th { border: 1px solid var(--fn-gray-200); }
52
+ }
53
+
54
+ /* Sortable column header button */
55
+ .fn-table__sort-btn {
56
+ display: inline-flex;
57
+ align-items: center;
58
+ gap: 4px;
59
+ cursor: pointer;
60
+ background: transparent;
61
+ border: none;
62
+ color: inherit;
63
+ font: inherit;
64
+ font-weight: 700;
65
+ padding: 0;
66
+
67
+ svg { transition: transform var(--fn-transition); }
68
+ &--asc svg { transform: rotate(0deg); }
69
+ &--desc svg { transform: rotate(180deg); }
70
+ }
71
+
72
+ /* Table toolbar (search + filters + actions above table, inside fn-table-wrapper) */
73
+ .fn-table-toolbar {
74
+ display: flex;
75
+ align-items: flex-end;
76
+ gap: 10px;
77
+ padding: 12px 16px;
78
+ border-bottom: 1px solid var(--fn-gray-200);
79
+ background: var(--fn-gray-50);
80
+ border-radius: var(--fn-radius-lg) var(--fn-radius-lg) 0 0;
81
+ flex-wrap: wrap;
82
+
83
+ &__search {
84
+ flex: 1;
85
+ min-width: 200px;
86
+ max-width: 320px;
87
+ }
88
+
89
+ &__filters {
90
+ display: flex;
91
+ align-items: flex-end;
92
+ gap: 8px;
93
+ flex-wrap: wrap;
94
+ flex: 1;
95
+ }
96
+
97
+ &__field {
98
+ display: flex;
99
+ flex-direction: column;
100
+ gap: 3px;
101
+ min-width: 140px;
102
+
103
+ // Variantes de ancho — usar en el template según contenido del filtro
104
+ &--sm { min-width: 110px; max-width: 140px; }
105
+ &--md { min-width: 160px; max-width: 220px; }
106
+ &--lg { min-width: 220px; max-width: 320px; }
107
+ }
108
+
109
+ &__label {
110
+ font-size: 10px;
111
+ font-weight: 700;
112
+ color: var(--fn-gray-400);
113
+ text-transform: uppercase;
114
+ letter-spacing: 0.06em;
115
+ white-space: nowrap;
116
+ }
117
+
118
+ &__actions {
119
+ display: flex;
120
+ align-items: center;
121
+ gap: 8px;
122
+ margin-left: auto;
123
+ flex-shrink: 0;
124
+ padding-bottom: 1px;
125
+ }
126
+
127
+ &__count {
128
+ font-size: var(--fn-text-sm);
129
+ color: var(--fn-gray-500);
130
+ white-space: nowrap;
131
+ }
132
+ }
133
+
134
+ /* Row actions cell */
135
+ .fn-table__actions {
136
+ display: flex;
137
+ align-items: center;
138
+ gap: 6px;
139
+ justify-content: flex-end;
140
+ }
141
+
142
+ /* ── Security events page ────────────────────────────────────────────────── */
143
+ .fn-sec-events {
144
+ &__filters { margin-bottom: 16px; }
145
+
146
+ &__filter-row {
147
+ display: flex;
148
+ align-items: flex-end;
149
+ gap: 12px;
150
+ flex-wrap: wrap;
151
+
152
+ .fn-form-group { margin-bottom: 0; min-width: 140px; }
153
+ }
154
+
155
+ &__filter-actions {
156
+ display: flex;
157
+ gap: 8px;
158
+ align-items: center;
159
+ padding-bottom: 2px;
160
+ }
161
+
162
+ &__date {
163
+ white-space: nowrap;
164
+ font-size: var(--fn-text-xs);
165
+ font-family: monospace;
166
+ color: var(--fn-gray-500);
167
+ }
168
+
169
+ &__type {
170
+ font-family: monospace;
171
+ font-size: var(--fn-text-xs);
172
+ background: var(--fn-gray-100);
173
+ padding: 2px 6px;
174
+ border-radius: var(--fn-radius-sm);
175
+ color: var(--fn-gray-700);
176
+ }
177
+
178
+ &__id {
179
+ font-size: var(--fn-text-xs);
180
+ font-family: monospace;
181
+ color: var(--fn-gray-500);
182
+ max-width: 160px;
183
+ overflow: hidden;
184
+ text-overflow: ellipsis;
185
+ white-space: nowrap;
186
+ }
187
+
188
+ &__meta {
189
+ font-size: var(--fn-text-xs);
190
+ font-family: monospace;
191
+ color: var(--fn-gray-600);
192
+ max-width: 200px;
193
+ display: block;
194
+ overflow: hidden;
195
+ text-overflow: ellipsis;
196
+ white-space: nowrap;
197
+ }
198
+
199
+ &__none { color: var(--fn-gray-300); }
200
+ }
201
+
202
+ /* Critical badge extra style */
203
+ .fn-badge--critical {
204
+ box-shadow: 0 0 0 2px var(--fn-danger-200);
205
+ font-weight: 800;
206
+ }
package/_tokens.scss ADDED
@@ -0,0 +1,82 @@
1
+ /* ── Design Tokens — CSS Custom Properties ─────────────────────────────── */
2
+ :root {
3
+ /* Colors — Primary (Navy #192a56) */
4
+ --fn-primary-50: #eef1fa;
5
+ --fn-primary-100: #d5dcf3;
6
+ --fn-primary-200: #a8b5e5;
7
+ --fn-primary-300: #7b8ed7;
8
+ --fn-primary-400: #4e67c9;
9
+ --fn-primary-500: #2f4bb3;
10
+ --fn-primary-600: #243a8e;
11
+ --fn-primary-700: #192a56;
12
+ --fn-primary-800: #111d3a;
13
+ --fn-primary-900: #0a1120;
14
+
15
+ /* Colors — Success */
16
+ --fn-success-50: #f0fdf4;
17
+ --fn-success-100: #dcfce7;
18
+ --fn-success-500: #22c55e;
19
+ --fn-success-600: #16a34a;
20
+ --fn-success-700: #15803d;
21
+
22
+ /* Colors — Danger */
23
+ --fn-danger-50: #fff1f2;
24
+ --fn-danger-100: #ffe4e6;
25
+ --fn-danger-300: #fca5a5;
26
+ --fn-danger-500: #ef4444;
27
+ --fn-danger-600: #dc2626;
28
+ --fn-danger-700: #b91c1c;
29
+
30
+ /* Colors — Warning */
31
+ --fn-warning-50: #fffbeb;
32
+ --fn-warning-100: #fef3c7;
33
+ --fn-warning-300: #fcd34d;
34
+ --fn-warning-500: #f59e0b;
35
+ --fn-warning-600: #d97706;
36
+
37
+ /* Colors — Info */
38
+ --fn-info-50: #eff6ff;
39
+ --fn-info-100: #dbeafe;
40
+ --fn-info-500: #3b82f6;
41
+ --fn-info-600: #2563eb;
42
+
43
+ /* Neutrals */
44
+ --fn-gray-50: #f9fafb;
45
+ --fn-gray-100: #f3f4f6;
46
+ --fn-gray-200: #e5e7eb;
47
+ --fn-gray-300: #d1d5db;
48
+ --fn-gray-400: #9ca3af;
49
+ --fn-gray-500: #6b7280;
50
+ --fn-gray-600: #4b5563;
51
+ --fn-gray-700: #374151;
52
+ --fn-gray-800: #1f2937;
53
+ --fn-gray-900: #111827;
54
+
55
+ /* Typography */
56
+ --fn-font-sans: 'Urbanist', ui-sans-serif, system-ui, sans-serif;
57
+ --fn-text-xs: 0.75rem; /* 12px */
58
+ --fn-text-sm: 0.875rem; /* 14px */
59
+ --fn-text-base: 1rem; /* 16px */
60
+ --fn-text-lg: 1.125rem; /* 18px */
61
+ --fn-text-xl: 1.25rem; /* 20px */
62
+ --fn-text-2xl: 1.5rem; /* 24px */
63
+ --fn-text-3xl: 1.875rem; /* 30px */
64
+
65
+ /* Border radii */
66
+ --fn-radius-sm: 4px;
67
+ --fn-radius: 6px;
68
+ --fn-radius-md: 8px;
69
+ --fn-radius-lg: 12px;
70
+ --fn-radius-xl: 16px;
71
+ --fn-radius-full: 9999px;
72
+
73
+ /* Shadows */
74
+ --fn-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
75
+ --fn-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
76
+ --fn-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
77
+ --fn-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
78
+
79
+ /* Transitions */
80
+ --fn-transition: 150ms ease;
81
+ --fn-transition-md: 250ms ease;
82
+ }
package/index.scss ADDED
@@ -0,0 +1,22 @@
1
+ /* ============================================================
2
+ @cuencor/styles — Design System
3
+ Importa todos los componentes fn- del sistema de diseño.
4
+
5
+ Uso en apps Angular:
6
+ @use '@cuencor/styles' as *;
7
+
8
+ O por parciales:
9
+ @use '@cuencor/styles/tokens' as *;
10
+ @use '@cuencor/styles/buttons' as *;
11
+ ============================================================ */
12
+
13
+ @forward 'tokens';
14
+ @forward 'buttons';
15
+ @forward 'forms';
16
+ @forward 'tables';
17
+ @forward 'dropdowns';
18
+ @forward 'cards';
19
+ @forward 'badges-alerts';
20
+ @forward 'modals';
21
+ @forward 'layout';
22
+ @forward 'feedback';
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@cuencor/styles",
3
+ "version": "0.0.1",
4
+ "description": "Cuencor design system — fn- SCSS component classes",
5
+ "keywords": ["cuencor", "design-system", "scss", "styles", "finaxis"],
6
+ "main": "index.scss",
7
+ "exports": {
8
+ ".": "./index.scss",
9
+ "./*": "./_*.scss"
10
+ },
11
+ "files": [
12
+ "*.scss",
13
+ "_*.scss"
14
+ ],
15
+ "license": "MIT",
16
+ "publishConfig": {
17
+ "access": "public"
18
+ }
19
+ }