@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,541 @@
1
+ @theme {
2
+ /* ============================================
3
+ Breakpoints - Sistema Responsive
4
+
5
+ Filosofía: Mobile-First
6
+ - Diseñar para mobile primero
7
+ - Usar min-width para breakpoints ascendentes
8
+ - Valores basados en dispositivos comunes
9
+
10
+ Convención:
11
+ - Breakpoint = valor mínimo del rango
12
+ - Usar em en lugar de px para accesibilidad (zoom)
13
+ - 1em = 16px (default browser)
14
+ ============================================ */
15
+
16
+ /* ============================================
17
+ Breakpoint Values - Valores Base
18
+ Basados en research de dispositivos comunes
19
+ ============================================ */
20
+
21
+ /* Extra Small - Mobile portrait (320px+) */
22
+ --breakpoint-xs: 20rem; /* 320px */
23
+
24
+ /* Small - Mobile landscape (640px+) */
25
+ --breakpoint-sm: 40rem; /* 640px */
26
+
27
+ /* Medium - Tablet portrait (768px+) */
28
+ --breakpoint-md: 48rem; /* 768px */
29
+
30
+ /* Large - Tablet landscape / Small desktop (1024px+) */
31
+ --breakpoint-lg: 64rem; /* 1024px */
32
+
33
+ /* Extra Large - Desktop (1280px+) */
34
+ --breakpoint-xl: 80rem; /* 1280px */
35
+
36
+ /* 2X Large - Large desktop (1536px+) */
37
+ --breakpoint-2xl: 96rem; /* 1536px */
38
+
39
+ /* 3X Large - Extra large desktop (1920px+) */
40
+ --breakpoint-3xl: 120rem; /* 1920px */
41
+
42
+ /* 4X Large - Ultra wide (2560px+) */
43
+ --breakpoint-4xl: 160rem; /* 2560px */
44
+
45
+ /* ============================================
46
+ Semantic Breakpoint Aliases
47
+ Nombres descriptivos basados en dispositivos
48
+ ============================================ */
49
+
50
+ --breakpoint-mobile: var(--breakpoint-xs);
51
+ --breakpoint-mobile-landscape: var(--breakpoint-sm);
52
+ --breakpoint-tablet: var(--breakpoint-md);
53
+ --breakpoint-tablet-landscape: var(--breakpoint-lg);
54
+ --breakpoint-desktop: var(--breakpoint-xl);
55
+ --breakpoint-desktop-large: var(--breakpoint-2xl);
56
+ --breakpoint-desktop-xl: var(--breakpoint-3xl);
57
+ --breakpoint-ultrawide: var(--breakpoint-4xl);
58
+
59
+ /* ============================================
60
+ Container Max-Widths
61
+ Anchos máximos para contenedores en cada breakpoint
62
+ ============================================ */
63
+
64
+ --container-max-width-xs: 100%;
65
+ --container-max-width-sm: 40rem; /* 640px */
66
+ --container-max-width-md: 48rem; /* 768px */
67
+ --container-max-width-lg: 64rem; /* 1024px */
68
+ --container-max-width-xl: 80rem; /* 1280px */
69
+ --container-max-width-2xl: 96rem; /* 1536px */
70
+ --container-max-width-3xl: 120rem; /* 1920px */
71
+
72
+ /* ============================================
73
+ Grid Columns por Breakpoint
74
+ Sistema de columnas responsive
75
+ ============================================ */
76
+
77
+ --grid-columns-xs: 4;
78
+ --grid-columns-sm: 6;
79
+ --grid-columns-md: 8;
80
+ --grid-columns-lg: 12;
81
+ --grid-columns-xl: 12;
82
+ --grid-columns-2xl: 12;
83
+
84
+ /* ============================================
85
+ Spacing por Breakpoint
86
+ Gutters y padding responsivos
87
+ ============================================ */
88
+
89
+ --container-padding-xs: var(--spacing-4, 1rem); /* 16px */
90
+ --container-padding-sm: var(--spacing-6, 1.5rem); /* 24px */
91
+ --container-padding-md: var(--spacing-8, 2rem); /* 32px */
92
+ --container-padding-lg: var(--spacing-12, 3rem); /* 48px */
93
+ --container-padding-xl: var(--spacing-16, 4rem); /* 64px */
94
+ }
95
+
96
+ /* ============================================
97
+ Media Query Mixins (Custom Properties)
98
+
99
+ Nota: CSS no soporta media queries en variables directamente,
100
+ pero podemos documentar los valores aquí y usar @custom-media
101
+ cuando tenga soporte completo.
102
+
103
+ Por ahora, usa estos valores en tus media queries:
104
+ ============================================ */
105
+
106
+ /* ============================================
107
+ Mobile-First Media Queries (Min-Width)
108
+ Uso: Estilos que se aplican desde el breakpoint hacia arriba
109
+ ============================================ */
110
+
111
+ /* Extra Small and up (320px+) - Mobile portrait */
112
+ @media (min-width: 20rem) {
113
+ :root {
114
+ --current-breakpoint: "xs";
115
+ }
116
+ }
117
+
118
+ /* Small and up (640px+) - Mobile landscape */
119
+ @media (min-width: 40rem) {
120
+ :root {
121
+ --current-breakpoint: "sm";
122
+ }
123
+ }
124
+
125
+ /* Medium and up (768px+) - Tablet portrait */
126
+ @media (min-width: 48rem) {
127
+ :root {
128
+ --current-breakpoint: "md";
129
+ }
130
+ }
131
+
132
+ /* Large and up (1024px+) - Tablet landscape */
133
+ @media (min-width: 64rem) {
134
+ :root {
135
+ --current-breakpoint: "lg";
136
+ }
137
+ }
138
+
139
+ /* Extra Large and up (1280px+) - Desktop */
140
+ @media (min-width: 80rem) {
141
+ :root {
142
+ --current-breakpoint: "xl";
143
+ }
144
+ }
145
+
146
+ /* 2X Large and up (1536px+) - Large desktop */
147
+ @media (min-width: 96rem) {
148
+ :root {
149
+ --current-breakpoint: "2xl";
150
+ }
151
+ }
152
+
153
+ /* 3X Large and up (1920px+) - Extra large desktop */
154
+ @media (min-width: 120rem) {
155
+ :root {
156
+ --current-breakpoint: "3xl";
157
+ }
158
+ }
159
+
160
+ /* 4X Large and up (2560px+) - Ultra wide */
161
+ @media (min-width: 160rem) {
162
+ :root {
163
+ --current-breakpoint: "4xl";
164
+ }
165
+ }
166
+
167
+ /* ============================================
168
+ Desktop-First Media Queries (Max-Width)
169
+ Uso: Estilos que se aplican hasta el breakpoint
170
+ ============================================ */
171
+
172
+ /* Small and down - Mobile only (< 640px) */
173
+ @media (max-width: 39.9375rem) {
174
+ /* 639px - justo antes de sm */
175
+ :root {
176
+ --viewport-category: "mobile";
177
+ }
178
+ }
179
+
180
+ /* Medium and down - Mobile + Tablet portrait (< 768px) */
181
+ @media (max-width: 47.9375rem) {
182
+ /* 767px - justo antes de md */
183
+ :root {
184
+ --viewport-category: "small-screen";
185
+ }
186
+ }
187
+
188
+ /* Large and down - No desktop (< 1024px) */
189
+ @media (max-width: 63.9375rem) {
190
+ /* 1023px - justo antes de lg */
191
+ :root {
192
+ --viewport-category: "tablet-or-smaller";
193
+ }
194
+ }
195
+
196
+ /* XL and down - No large desktop (< 1280px) */
197
+ @media (max-width: 79.9375rem) {
198
+ /* 1279px - justo antes de xl */
199
+ :root {
200
+ --viewport-category: "laptop-or-smaller";
201
+ }
202
+ }
203
+
204
+ /* ============================================
205
+ Range Media Queries (Between)
206
+ Uso: Estilos que se aplican solo en un rango específico
207
+ ============================================ */
208
+
209
+ /* Only Small (640px - 767px) - Mobile landscape only */
210
+ @media (min-width: 40rem) and (max-width: 47.9375rem) {
211
+ :root {
212
+ --viewport-range: "sm-only";
213
+ }
214
+ }
215
+
216
+ /* Only Medium (768px - 1023px) - Tablet portrait only */
217
+ @media (min-width: 48rem) and (max-width: 63.9375rem) {
218
+ :root {
219
+ --viewport-range: "md-only";
220
+ }
221
+ }
222
+
223
+ /* Only Large (1024px - 1279px) - Tablet landscape only */
224
+ @media (min-width: 64rem) and (max-width: 79.9375rem) {
225
+ :root {
226
+ --viewport-range: "lg-only";
227
+ }
228
+ }
229
+
230
+ /* Only XL (1280px - 1535px) - Desktop only */
231
+ @media (min-width: 80rem) and (max-width: 95.9375rem) {
232
+ :root {
233
+ --viewport-range: "xl-only";
234
+ }
235
+ }
236
+
237
+ /* ============================================
238
+ Orientation Media Queries
239
+ ============================================ */
240
+
241
+ @media (orientation: portrait) {
242
+ :root {
243
+ --orientation: "portrait";
244
+ }
245
+ }
246
+
247
+ @media (orientation: landscape) {
248
+ :root {
249
+ --orientation: "landscape";
250
+ }
251
+ }
252
+
253
+ /* ============================================
254
+ Pixel Density Media Queries
255
+ Para imágenes retina y high-DPI
256
+ ============================================ */
257
+
258
+ /* Standard resolution (1x) */
259
+ @media (min-resolution: 1dppx) {
260
+ :root {
261
+ --pixel-density: "1x";
262
+ }
263
+ }
264
+
265
+ /* Retina / High-DPI (2x) */
266
+ @media (min-resolution: 2dppx) {
267
+ :root {
268
+ --pixel-density: "2x";
269
+ }
270
+ }
271
+
272
+ /* Ultra High-DPI (3x) */
273
+ @media (min-resolution: 3dppx) {
274
+ :root {
275
+ --pixel-density: "3x";
276
+ }
277
+ }
278
+
279
+ /* ============================================
280
+ Hover Capability
281
+ Detecta si el dispositivo soporta hover
282
+ ============================================ */
283
+
284
+ /* Touch devices (no hover) */
285
+ @media (hover: none) {
286
+ :root {
287
+ --has-hover: "false";
288
+ /* Aumentar tamaños de click targets */
289
+ --min-tap-size: 44px; /* iOS guideline */
290
+ }
291
+ }
292
+
293
+ /* Devices with hover capability */
294
+ @media (hover: hover) {
295
+ :root {
296
+ --has-hover: "true";
297
+ --min-tap-size: 32px;
298
+ }
299
+ }
300
+
301
+ /* ============================================
302
+ Pointer Precision
303
+ Detecta precisión del pointer (touch vs mouse)
304
+ ============================================ */
305
+
306
+ /* Coarse pointer (touch) */
307
+ @media (pointer: coarse) {
308
+ :root {
309
+ --pointer-type: "coarse";
310
+ --pointer-precision: "low";
311
+ }
312
+ }
313
+
314
+ /* Fine pointer (mouse, stylus) */
315
+ @media (pointer: fine) {
316
+ :root {
317
+ --pointer-type: "fine";
318
+ --pointer-precision: "high";
319
+ }
320
+ }
321
+
322
+ /* ============================================
323
+ Color Scheme Preference
324
+ ============================================ */
325
+
326
+ @media (prefers-color-scheme: light) {
327
+ :root {
328
+ --preferred-color-scheme: "light";
329
+ }
330
+ }
331
+
332
+ @media (prefers-color-scheme: dark) {
333
+ :root {
334
+ --preferred-color-scheme: "dark";
335
+ }
336
+ }
337
+
338
+ /* ============================================
339
+ Contrast Preference
340
+ ============================================ */
341
+
342
+ @media (prefers-contrast: more) {
343
+ :root {
344
+ --preferred-contrast: "more";
345
+ /* Aumentar contraste de colores */
346
+ --min-contrast-ratio: 7; /* WCAG AAA */
347
+ }
348
+ }
349
+
350
+ @media (prefers-contrast: less) {
351
+ :root {
352
+ --preferred-contrast: "less";
353
+ }
354
+ }
355
+
356
+ /* ============================================
357
+ Transparency Preference
358
+ ============================================ */
359
+
360
+ @media (prefers-reduced-transparency: reduce) {
361
+ :root {
362
+ --reduced-transparency: "true";
363
+ /* Eliminar opacity en elementos críticos */
364
+ }
365
+ }
366
+
367
+ /* ============================================
368
+ Data Saver Mode
369
+ ============================================ */
370
+
371
+ @media (prefers-reduced-data: reduce) {
372
+ :root {
373
+ --reduced-data: "true";
374
+ /* Cargar imágenes de menor calidad */
375
+ /* Deshabilitar autoplay de videos */
376
+ }
377
+ }
378
+
379
+ /* ============================================
380
+ Container Queries
381
+ Permite componentes responsive independientes del viewport
382
+
383
+ Uso:
384
+ .container {
385
+ container-type: inline-size;
386
+ container-name: card;
387
+ }
388
+
389
+ @container card (min-width: 400px) {
390
+ .card-content { flex-direction: row; }
391
+ }
392
+ ============================================ */
393
+
394
+ /* Container query breakpoints (en px por simplicidad) */
395
+ @media (min-width: 1px) {
396
+ :root {
397
+ /* Valores sugeridos para container queries */
398
+ --container-xs: 20rem; /* 320px */
399
+ --container-sm: 24rem; /* 384px */
400
+ --container-md: 28rem; /* 448px */
401
+ --container-lg: 32rem; /* 512px */
402
+ --container-xl: 36rem; /* 576px */
403
+ --container-2xl: 42rem; /* 672px */
404
+ }
405
+ }
406
+
407
+ /* ============================================
408
+ Print Media Query
409
+ Estilos específicos para impresión
410
+ ============================================ */
411
+
412
+ @media print {
413
+ :root {
414
+ --media-type: "print";
415
+
416
+ /* Ajustes para impresión */
417
+ --print-font-size: 12pt;
418
+ --print-line-height: 1.5;
419
+ }
420
+
421
+ /* Ocultar elementos innecesarios en impresión */
422
+ .no-print,
423
+ .navigation,
424
+ .sidebar,
425
+ .footer,
426
+ button,
427
+ .interactive {
428
+ display: none !important;
429
+ }
430
+
431
+ /* Asegurar fondos blancos */
432
+ * {
433
+ background: white !important;
434
+ color: black !important;
435
+ }
436
+
437
+ /* Evitar saltos de página dentro de elementos */
438
+ .keep-together {
439
+ page-break-inside: avoid;
440
+ }
441
+
442
+ /* Links: mostrar URL */
443
+ a[href]:after {
444
+ content: " (" attr(href) ")";
445
+ }
446
+ }
447
+
448
+ /* ============================================
449
+ Screen Reader Only
450
+ No es un media query, pero útil para accesibilidad
451
+ ============================================ */
452
+
453
+ .sr-only {
454
+ position: absolute;
455
+ width: 1px;
456
+ height: 1px;
457
+ padding: 0;
458
+ margin: -1px;
459
+ overflow: hidden;
460
+ clip: rect(0, 0, 0, 0);
461
+ white-space: nowrap;
462
+ border-width: 0;
463
+ }
464
+
465
+ /* ============================================
466
+ DOCUMENTACIÓN DE USO
467
+
468
+ Mobile-First Approach (Recomendado):
469
+ -----------------------------------
470
+ .element {
471
+ // Estilos para mobile (base)
472
+ font-size: 14px;
473
+ }
474
+
475
+ @media (min-width: 48rem) { // md
476
+ .element {
477
+ font-size: 16px; // tablet y arriba
478
+ }
479
+ }
480
+
481
+ @media (min-width: 80rem) { // xl
482
+ .element {
483
+ font-size: 18px; // desktop y arriba
484
+ }
485
+ }
486
+
487
+ Desktop-First Approach (Legacy):
488
+ -------------------------------
489
+ .element {
490
+ font-size: 18px; // desktop por defecto
491
+ }
492
+
493
+ @media (max-width: 79.9375rem) { // < xl
494
+ .element {
495
+ font-size: 16px; // tablet
496
+ }
497
+ }
498
+
499
+ @media (max-width: 47.9375rem) { // < md
500
+ .element {
501
+ font-size: 14px; // mobile
502
+ }
503
+ }
504
+
505
+ Range Queries:
506
+ -------------
507
+ @media (min-width: 48rem) and (max-width: 63.9375rem) {
508
+ .element {
509
+ // Solo en tablets (md-only)
510
+ }
511
+ }
512
+
513
+ Container Queries (Moderno):
514
+ ---------------------------
515
+ .card-container {
516
+ container-type: inline-size;
517
+ container-name: card;
518
+ }
519
+
520
+ @container card (min-width: 400px) {
521
+ .card-layout {
522
+ display: grid;
523
+ grid-template-columns: 1fr 2fr;
524
+ }
525
+ }
526
+
527
+ Feature Detection:
528
+ -----------------
529
+ @media (hover: hover) {
530
+ .button:hover {
531
+ // Solo en dispositivos con hover
532
+ }
533
+ }
534
+
535
+ @media (pointer: coarse) {
536
+ .button {
537
+ // Targets más grandes para touch
538
+ min-height: 44px;
539
+ }
540
+ }
541
+ ============================================ */