@bsginstitute/bsg-integra 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.
@@ -0,0 +1,200 @@
1
+ @theme {
2
+ /* ============================================
3
+ Font Families
4
+ ============================================ */
5
+ --font-family-sans: "Inter", sans-serif;
6
+
7
+ --font-family-serif:
8
+ ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
9
+
10
+ --font-family-mono: "Fira Code", monospace;
11
+
12
+ /* Alias para compatibilidad */
13
+ --font-family-base: var(--font-family-sans);
14
+ --font-family-heading: var(--font-family-sans);
15
+ --font-family-code: var(--font-family-mono);
16
+
17
+ /* ============================================
18
+ Font Sizes
19
+ ============================================ */
20
+ --font-size-xs: 0.75rem; /* 12px */
21
+ --font-size-sm: 0.875rem; /* 14px */
22
+ --font-size-base: 1rem; /* 16px */
23
+ --font-size-lg: 1.125rem; /* 18px */
24
+ --font-size-xl: 1.25rem; /* 20px */
25
+ --font-size-2xl: 1.5rem; /* 24px */
26
+ --font-size-3xl: 1.875rem; /* 30px */
27
+ --font-size-4xl: 2.25rem; /* 36px */
28
+ --font-size-5xl: 3rem; /* 48px */
29
+ --font-size-6xl: 3.75rem; /* 60px */
30
+ --font-size-7xl: 4.5rem; /* 72px */
31
+ --font-size-8xl: 6rem; /* 96px */
32
+ --font-size-9xl: 8rem; /* 128px */
33
+
34
+ /* ============================================
35
+ Font Weights
36
+ ============================================ */
37
+ --font-weight-thin: 100;
38
+ --font-weight-extralight: 200;
39
+ --font-weight-light: 300;
40
+ --font-weight-normal: 400;
41
+ --font-weight-medium: 500;
42
+ --font-weight-semibold: 600;
43
+ --font-weight-bold: 700;
44
+ --font-weight-extrabold: 800;
45
+ --font-weight-black: 900;
46
+
47
+ /* Alias semánticos */
48
+ --font-weight-base: var(--font-weight-normal);
49
+ --font-weight-heading: var(--font-weight-bold);
50
+
51
+ /* ============================================
52
+ Line Heights
53
+ ============================================ */
54
+ --line-height-none: 1;
55
+ --line-height-tight: 1.25;
56
+ --line-height-snug: 1.375;
57
+ --line-height-normal: 1.5;
58
+ --line-height-relaxed: 1.625;
59
+ --line-height-loose: 2;
60
+
61
+ /* Alias semánticos */
62
+ --line-height-base: var(--line-height-normal);
63
+ --line-height-heading: var(--line-height-tight);
64
+
65
+ /* ============================================
66
+ Letter Spacing (Tracking)
67
+ ============================================ */
68
+ --letter-spacing-tighter: -0.05em;
69
+ --letter-spacing-tight: -0.025em;
70
+ --letter-spacing-normal: 0em;
71
+ --letter-spacing-wide: 0.025em;
72
+ --letter-spacing-wider: 0.05em;
73
+ --letter-spacing-widest: 0.1em;
74
+
75
+ /* Alias semánticos */
76
+ --letter-spacing-base: var(--letter-spacing-normal);
77
+ --letter-spacing-heading: var(--letter-spacing-tight);
78
+
79
+ /* ============================================
80
+ Tokens Semánticos - Headings
81
+ Uso: Títulos y encabezados principales
82
+ ============================================ */
83
+
84
+ /* Display - Títulos extra grandes (Hero sections) */
85
+ --typography-display-size: var(--font-size-7xl);
86
+ --typography-display-weight: var(--font-weight-extrabold);
87
+ --typography-display-line-height: var(--line-height-none);
88
+ --typography-display-letter-spacing: var(--letter-spacing-tighter);
89
+
90
+ /* Heading 1 */
91
+ --typography-h1-size: var(--font-size-5x l);
92
+ --typography-h1-weight: var(--font-weight-bold);
93
+ --typography-h1-line-height: var(--line-height-tight);
94
+ --typography-h1-letter-spacing: var(--letter-spacing-tight);
95
+
96
+ /* Heading 2 */
97
+ --typography-h2-size: var(--font-size-4xl);
98
+ --typography-h2-weight: var(--font-weight-bold);
99
+ --typography-h2-line-height: var(--line-height-tight);
100
+ --typography-h2-letter-spacing: var(--letter-spacing-tight);
101
+
102
+ /* Heading 3 */
103
+ --typography-h3-size: var(--font-size-3xl);
104
+ --typography-h3-weight: var(--font-weight-semibold);
105
+ --typography-h3-line-height: var(--line-height-snug);
106
+ --typography-h3-letter-spacing: var(--letter-spacing-normal);
107
+
108
+ /* Heading 4 */
109
+ --typography-h4-size: var(--font-size-2xl);
110
+ --typography-h4-weight: var(--font-weight-semibold);
111
+ --typography-h4-line-height: var(--line-height-snug);
112
+ --typography-h4-letter-spacing: var(--letter-spacing-normal);
113
+
114
+ /* Heading 5 */
115
+ --typography-h5-size: var(--font-size-xl);
116
+ --typography-h5-weight: var(--font-weight-semibold);
117
+ --typography-h5-line-height: var(--line-height-normal);
118
+ --typography-h5-letter-spacing: var(--letter-spacing-normal);
119
+
120
+ /* Heading 6 */
121
+ --typography-h6-size: var(--font-size-lg);
122
+ --typography-h6-weight: var(--font-weight-semibold);
123
+ --typography-h6-line-height: var(--line-height-normal);
124
+ --typography-h6-letter-spacing: var(--letter-spacing-normal);
125
+
126
+ /* ============================================
127
+ Tokens Semánticos - Body Text
128
+ Uso: Contenido principal y párrafos
129
+ ============================================ */
130
+
131
+ /* Large Body */
132
+ --typography-body-lg-size: var(--font-size-lg);
133
+ --typography-body-lg-weight: var(--font-weight-normal);
134
+ --typography-body-lg-line-height: var(--line-height-relaxed);
135
+ --typography-body-lg-letter-spacing: var(--letter-spacing-normal);
136
+
137
+ /* Base Body */
138
+ --typography-body-size: var(--font-size-base);
139
+ --typography-body-weight: var(--font-weight-normal);
140
+ --typography-body-line-height: var(--line-height-normal);
141
+ --typography-body-letter-spacing: var(--letter-spacing-normal);
142
+
143
+ /* Small Body */
144
+ --typography-body-sm-size: var(--font-size-sm);
145
+ --typography-body-sm-weight: var(--font-weight-normal);
146
+ --typography-body-sm-line-height: var(--line-height-normal);
147
+ --typography-body-sm-letter-spacing: var(--letter-spacing-normal);
148
+
149
+ /* ============================================
150
+ Tokens Semánticos - Utility Text
151
+ Uso: Labels, captions, overlines
152
+ ============================================ */
153
+
154
+ /* Label - Para etiquetas de formularios */
155
+ --typography-label-size: var(--font-size-sm);
156
+ --typography-label-weight: var(--font-weight-medium);
157
+ --typography-label-line-height: var(--line-height-normal);
158
+ --typography-label-letter-spacing: var(--letter-spacing-normal);
159
+
160
+ /* Caption - Texto pequeño descriptivo */
161
+ --typography-caption-size: var(--font-size-xs);
162
+ --typography-caption-weight: var(--font-weight-normal);
163
+ --typography-caption-line-height: var(--line-height-normal);
164
+ --typography-caption-letter-spacing: var(--letter-spacing-normal);
165
+
166
+ /* Overline - Texto categórico superior */
167
+ --typography-overline-size: var(--font-size-xs);
168
+ --typography-overline-weight: var(--font-weight-semibold);
169
+ --typography-overline-line-height: var(--line-height-normal);
170
+ --typography-overline-letter-spacing: var(--letter-spacing-widest);
171
+
172
+ /* ============================================
173
+ Tokens Semánticos - Interactive Elements
174
+ Uso: Botones, links, tabs
175
+ ============================================ */
176
+
177
+ /* Button Large */
178
+ --typography-button-lg-size: var(--font-size-lg);
179
+ --typography-button-lg-weight: var(--font-weight-semibold);
180
+ --typography-button-lg-line-height: var(--line-height-tight);
181
+ --typography-button-lg-letter-spacing: var(--letter-spacing-normal);
182
+
183
+ /* Button Base */
184
+ --typography-button-size: var(--font-size-base);
185
+ --typography-button-weight: var(--font-weight-semibold);
186
+ --typography-button-line-height: var(--line-height-tight);
187
+ --typography-button-letter-spacing: var(--letter-spacing-normal);
188
+
189
+ /* Button Small */
190
+ --typography-button-sm-size: var(--font-size-sm);
191
+ --typography-button-sm-weight: var(--font-weight-semibold);
192
+ --typography-button-sm-line-height: var(--line-height-tight);
193
+ --typography-button-sm-letter-spacing: var(--letter-spacing-normal);
194
+
195
+ /* Link */
196
+ --typography-link-size: inherit;
197
+ --typography-link-weight: var(--font-weight-medium);
198
+ --typography-link-line-height: inherit;
199
+ --typography-link-letter-spacing: inherit;
200
+ }
@@ -0,0 +1,316 @@
1
+ @theme {
2
+ /* ============================================
3
+ Z-Index Scale - Sistema de Capas
4
+
5
+ Filosofía:
6
+ - Usar valores espaciados (100, 200, 300) para permitir capas intermedias
7
+ - Nombres semánticos en lugar de números mágicos
8
+ - Jerarquía clara y predecible
9
+ - Evitar valores arbitrariamente altos (9999, 999999)
10
+
11
+ Regla general:
12
+ Cuanto más cerca del usuario, mayor el z-index
13
+ ============================================ */
14
+
15
+ /* ============================================
16
+ Base Scale - Valores Primitivos
17
+ ============================================ */
18
+
19
+ /* Valores negativos - Elementos de fondo */
20
+ --z-index-negative: -1;
21
+ --z-index-behind: -10;
22
+
23
+ /* Base layer - Contenido normal (default) */
24
+ --z-index-base: 0;
25
+ --z-index-default: 0;
26
+
27
+ /* Low elevation - Elementos ligeramente elevados */
28
+ --z-index-low: 10;
29
+
30
+ /* Medium elevation - Elementos moderadamente elevados */
31
+ --z-index-medium: 100;
32
+
33
+ /* High elevation - Elementos muy elevados */
34
+ --z-index-high: 1000;
35
+
36
+ /* Critical elevation - Elementos críticos */
37
+ --z-index-critical: 10000;
38
+
39
+ /* ============================================
40
+ Content Layers - Capas de Contenido
41
+ 0-99: Elementos de contenido estándar
42
+ ============================================ */
43
+
44
+ /* Background decorations */
45
+ --z-index-decoration: var(--z-index-negative);
46
+ --z-index-background-pattern: -5;
47
+
48
+ /* Content base */
49
+ --z-index-content: var(--z-index-base);
50
+
51
+ /* Sticky elements */
52
+ --z-index-sticky: 10;
53
+ --z-index-sticky-content: 20;
54
+
55
+ /* Fixed background elements */
56
+ --z-index-fixed-background: 30;
57
+
58
+ /* ============================================
59
+ Navigation Layers
60
+ 100-199: Elementos de navegación
61
+ ============================================ */
62
+
63
+ /* Header/Navbar */
64
+ --z-index-header: 100;
65
+ --z-index-navbar: 100;
66
+
67
+ /* Sidebar */
68
+ --z-index-sidebar: 110;
69
+
70
+ /* Tab bar */
71
+ --z-index-tabbar: 120;
72
+
73
+ /* Bottom navigation */
74
+ --z-index-bottom-nav: 130;
75
+
76
+ /* Floating action button */
77
+ --z-index-fab: 140;
78
+
79
+ /* App bar */
80
+ --z-index-appbar: 150;
81
+
82
+ /* ============================================
83
+ Overlay Layers
84
+ 200-299: Elementos que cubren contenido
85
+ ============================================ */
86
+
87
+ /* Backdrop/Overlay base */
88
+ --z-index-backdrop: 200;
89
+ --z-index-overlay: 200;
90
+
91
+ /* Drawer overlay */
92
+ --z-index-drawer-overlay: 210;
93
+
94
+ /* Scrim (overlay semi-transparente) */
95
+ --z-index-scrim: 220;
96
+
97
+ /* ============================================
98
+ Dropdown/Popover Layers
99
+ 300-499: Elementos flotantes contextuales
100
+ ============================================ */
101
+
102
+ /* Dropdown menu */
103
+ --z-index-dropdown: 300;
104
+
105
+ /* Select dropdown */
106
+ --z-index-select: 310;
107
+
108
+ /* Combobox */
109
+ --z-index-combobox: 320;
110
+
111
+ /* Autocomplete */
112
+ --z-index-autocomplete: 330;
113
+
114
+ /* Context menu */
115
+ --z-index-context-menu: 340;
116
+
117
+ /* Popover */
118
+ --z-index-popover: 350;
119
+
120
+ /* Datepicker */
121
+ --z-index-datepicker: 360;
122
+
123
+ /* Color picker */
124
+ --z-index-colorpicker: 370;
125
+
126
+ /* Menu cascading (submenus) */
127
+ --z-index-submenu: 380;
128
+
129
+ /* ============================================
130
+ Tooltip Layers
131
+ 500-599: Tooltips y hints
132
+ ============================================ */
133
+
134
+ /* Tooltip base */
135
+ --z-index-tooltip: 500;
136
+
137
+ /* Tooltip con backdrop */
138
+ --z-index-tooltip-backdrop: 510;
139
+
140
+ /* Hint/Tour overlay */
141
+ --z-index-hint: 520;
142
+
143
+ /* ============================================
144
+ Dialog/Modal Layers
145
+ 1000-1999: Modales y diálogos
146
+ ============================================ */
147
+
148
+ /* Modal backdrop */
149
+ --z-index-modal-backdrop: 1000;
150
+
151
+ /* Modal base */
152
+ --z-index-modal: 1010;
153
+ --z-index-dialog: 1010;
154
+
155
+ /* Sheet (bottom/side sheet) */
156
+ --z-index-sheet: 1020;
157
+
158
+ /* Alert dialog */
159
+ --z-index-alert-dialog: 1030;
160
+
161
+ /* Confirmation dialog */
162
+ --z-index-confirm-dialog: 1040;
163
+
164
+ /* Full screen modal */
165
+ --z-index-fullscreen-modal: 1050;
166
+
167
+ /* ============================================
168
+ Toast/Notification Layers
169
+ 2000-2999: Notificaciones y mensajes
170
+ ============================================ */
171
+
172
+ /* Toast base */
173
+ --z-index-toast: 2000;
174
+ --z-index-snackbar: 2000;
175
+
176
+ /* Notification */
177
+ --z-index-notification: 2010;
178
+
179
+ /* Alert banner */
180
+ --z-index-alert: 2020;
181
+
182
+ /* System banner */
183
+ --z-index-banner: 2030;
184
+
185
+ /* ============================================
186
+ Loading/Progress Layers
187
+ 3000-3999: Indicadores de carga
188
+ ============================================ */
189
+
190
+ /* Loading overlay */
191
+ --z-index-loading: 3000;
192
+
193
+ /* Progress bar (fixed) */
194
+ --z-index-progress: 3010;
195
+
196
+ /* Skeleton loader overlay */
197
+ --z-index-skeleton-overlay: 3020;
198
+
199
+ /* Splash screen */
200
+ --z-index-splash: 3030;
201
+
202
+ /* ============================================
203
+ Utility Layers
204
+ 4000-4999: Utilidades y overlays especiales
205
+ ============================================ */
206
+
207
+ /* Image lightbox backdrop */
208
+ --z-index-lightbox-backdrop: 4000;
209
+
210
+ /* Image lightbox */
211
+ --z-index-lightbox: 4010;
212
+
213
+ /* Video player overlay controls */
214
+ --z-index-video-controls: 4020;
215
+
216
+ /* Picture-in-picture */
217
+ --z-index-pip: 4030;
218
+
219
+ /* Screenshot overlay */
220
+ --z-index-screenshot: 4040;
221
+
222
+ /* ============================================
223
+ Debug/Dev Layers
224
+ 5000-5999: Herramientas de desarrollo
225
+ ============================================ */
226
+
227
+ /* Dev tools overlay */
228
+ --z-index-devtools: 5000;
229
+
230
+ /* Debug panel */
231
+ --z-index-debug: 5010;
232
+
233
+ /* Inspector */
234
+ --z-index-inspector: 5020;
235
+
236
+ /* Performance overlay */
237
+ --z-index-performance: 5030;
238
+
239
+ /* ============================================
240
+ Critical/System Layers
241
+ 10000+: Elementos críticos del sistema
242
+ ============================================ */
243
+
244
+ /* Cookie consent banner */
245
+ --z-index-cookie-consent: 10000;
246
+
247
+ /* GDPR notice */
248
+ --z-index-gdpr-notice: 10010;
249
+
250
+ /* Emergency alert */
251
+ --z-index-emergency: 10020;
252
+
253
+ /* System maintenance banner */
254
+ --z-index-system-banner: 10030;
255
+
256
+ /* Browser compatibility warning */
257
+ --z-index-browser-warning: 10040;
258
+
259
+ /* Tutorial overlay (first-time user) */
260
+ --z-index-tutorial: 10050;
261
+
262
+ /* Onboarding overlay */
263
+ --z-index-onboarding: 10060;
264
+
265
+ /* ============================================
266
+ Maximum Layer - Uso extremadamente raro
267
+ ============================================ */
268
+ --z-index-maximum: 99999;
269
+ }
270
+
271
+ /* ============================================
272
+ Stacking Context Documentation
273
+
274
+ IMPORTANTE: Crear un nuevo stacking context puede afectar el z-index.
275
+
276
+ Propiedades que crean stacking context:
277
+ - position: relative/absolute/fixed/sticky con z-index != auto
278
+ - opacity < 1
279
+ - transform != none
280
+ - filter != none
281
+ - perspective != none
282
+ - clip-path != none
283
+ - isolation: isolate
284
+ - will-change con ciertas propiedades
285
+
286
+ Buenas prácticas:
287
+ 1. Usar tokens semánticos en lugar de valores numéricos directos
288
+ 2. Agrupar componentes relacionados en el mismo rango
289
+ 3. Dejar espacio entre rangos para futuras inserciones
290
+ 4. Documentar cualquier uso de z-index fuera de este sistema
291
+ 5. Evitar z-index: 9999 u otros valores arbitrariamente altos
292
+
293
+ Debugging:
294
+ Para visualizar capas, usa:
295
+ * { outline: 1px solid rgba(255, 0, 0, 0.1); }
296
+
297
+ O en DevTools:
298
+ Chrome: Layers panel
299
+ Firefox: 3D View
300
+ ============================================ */
301
+
302
+ /* ============================================
303
+ Helper Classes (Opcional)
304
+ Descomentar si deseas clases utility
305
+ ============================================ */
306
+
307
+ /*
308
+ .z-base { z-index: var(--z-index-base); }
309
+ .z-sticky { z-index: var(--z-index-sticky); }
310
+ .z-header { z-index: var(--z-index-header); }
311
+ .z-dropdown { z-index: var(--z-index-dropdown); }
312
+ .z-tooltip { z-index: var(--z-index-tooltip); }
313
+ .z-modal { z-index: var(--z-index-modal); }
314
+ .z-toast { z-index: var(--z-index-toast); }
315
+ .z-loading { z-index: var(--z-index-loading); }
316
+ */
package/src/styles.css ADDED
@@ -0,0 +1,69 @@
1
+ /* ============================================
2
+ Tailwind CSS
3
+ ============================================ */
4
+ @import "tailwindcss";
5
+
6
+ /* Escanear archivos TypeScript para clases de Tailwind */
7
+ @source "./lib/**/*.ts";
8
+ @source "./stories/**/*.ts";
9
+
10
+ /* Configurar dark mode para .dark */
11
+ @variant dark (.dark &);
12
+
13
+ /* ============================================
14
+ Importar Fuentes desde Google Fonts
15
+ ============================================ */
16
+ @import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700&family=Fira+Code:wght@300;400;500;600;700&display=swap");
17
+
18
+ /* ============================================
19
+ Tokens de Diseño
20
+ ============================================ */
21
+
22
+ /* Tokens de Color (OKLCH) */
23
+ @import "./lib/tokens/colors.css";
24
+
25
+ /* Tokens de Temas (Claro/Oscuro) */
26
+ @import "./lib/tokens/themes.css";
27
+
28
+ /* Tokens de Espaciado */
29
+ @import "./lib/tokens/spacing.css";
30
+
31
+ /* Tokens de Tipografía */
32
+ @import "./lib/tokens/typography.css";
33
+
34
+ /* Tokens de Animaciones */
35
+ @import "./lib/tokens/animations.css";
36
+
37
+ /* Tokens de Bordes */
38
+ @import "./lib/tokens/borders.css";
39
+
40
+ /* Tokens de Sombras */
41
+ @import "./lib/tokens/shadows.css";
42
+
43
+ /* Tokens de Breakpoints y Media Queries */
44
+ @import "./lib/tokens/breakpoints.css";
45
+
46
+ /* Tokens de Z-Index */
47
+ @import "./lib/tokens/z-index.css";
48
+
49
+ /* ============================================
50
+ Estilos Base
51
+ ============================================ */
52
+
53
+ /* Aplicar fuente por defecto al body */
54
+ body {
55
+ font-family: var(--font-family-sans);
56
+ font-size: var(--font-size-base);
57
+ font-weight: var(--font-weight-normal);
58
+ line-height: var(--line-height-normal);
59
+ color: var(--color-foreground-default);
60
+ background-color: var(--color-background-default);
61
+ }
62
+
63
+ /* Estilos para código */
64
+ code,
65
+ pre,
66
+ kbd,
67
+ samp {
68
+ font-family: var(--font-family-mono);
69
+ }