@solercia/ui 0.6.0 → 0.6.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/CHANGELOG.md +66 -0
- package/fesm2022/solercia-ui-theme-studio.mjs +1872 -808
- package/fesm2022/solercia-ui-theme-studio.mjs.map +1 -1
- package/fesm2022/solercia-ui.mjs +284 -10
- package/fesm2022/solercia-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/solercia-ui-theme-studio.d.ts +185 -52
- package/types/solercia-ui.d.ts +89 -10
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, ElementRef, input, computed, effect, ChangeDetectionStrategy, Component, DestroyRef, output, signal, viewChild } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
-
import {
|
|
5
|
-
import { SOL_BUNDLED_DEFAULT_THEME, resolveCssVars, SOL_TABLE_VARIANTS, isRenderableTheme, SOL_I18N, sanitizeAssetUrl, ThemeService, SOL_DEFAULT_THEME, buildGoogleFontsUrl, SolButtonComponent, SolIconComponent, SolModalComponent, SolDrawerComponent, SolSpinnerComponent } from '@solercia/ui';
|
|
4
|
+
import { SOL_BUNDLED_DEFAULT_THEME, resolveCssVars, SOL_TABLE_VARIANTS, isRenderableTheme, SOL_I18N, sanitizeAssetUrl, ThemeService, SOL_DEFAULT_THEME, buildGoogleFontsUrl, SolButtonComponent, SolIconComponent, SolConfirmDialogComponent, SolRevealDirective, SolSpinnerComponent } from '@solercia/ui';
|
|
6
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Mensaje legible de un error del store, si lo trae. Reconoce la forma de `HttpErrorResponse`
|
|
8
|
+
* (`error.message` o `error.errors[0].message` del cuerpo de la respuesta) y un objeto plano
|
|
9
|
+
* `{ message }` marcado como mensaje para la persona usuaria (`userMessage`). Nunca devuelve el
|
|
10
|
+
* texto técnico de un `Error` cualquiera (por ejemplo, "Http failure response for …").
|
|
11
|
+
*/
|
|
12
|
+
function extractStoreErrorMessage(error) {
|
|
13
|
+
if (!error || typeof error !== 'object')
|
|
14
|
+
return null;
|
|
15
|
+
const record = error;
|
|
16
|
+
if (typeof record['userMessage'] === 'string' && record['userMessage'].trim())
|
|
17
|
+
return record['userMessage'];
|
|
18
|
+
const body = record['error'];
|
|
19
|
+
if (!body || typeof body !== 'object')
|
|
20
|
+
return null;
|
|
21
|
+
const bodyRecord = body;
|
|
22
|
+
if (typeof bodyRecord['message'] === 'string' && bodyRecord['message'].trim())
|
|
23
|
+
return bodyRecord['message'];
|
|
24
|
+
const errors = bodyRecord['errors'];
|
|
25
|
+
if (Array.isArray(errors)) {
|
|
26
|
+
const first = errors[0];
|
|
27
|
+
if (first && typeof first['message'] === 'string' && first['message'].trim())
|
|
28
|
+
return first['message'];
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
7
32
|
/** Token del puerto de persistencia. Sin proveedor, `<sol-theme-studio>` muestra su estado de error. */
|
|
8
33
|
const THEME_STUDIO_STORE = new InjectionToken('THEME_STUDIO_STORE');
|
|
9
34
|
|
|
@@ -241,6 +266,13 @@ const DEFAULT_STUDIO_FORM = {
|
|
|
241
266
|
function cloneStudioForm(form) {
|
|
242
267
|
return { ...form, light: { ...form.light }, dark: { ...form.dark } };
|
|
243
268
|
}
|
|
269
|
+
const STUDIO_LOADER_PRESENTATIONS = ['current', 'centered', 'backdrop'];
|
|
270
|
+
const STUDIO_LOADER_ANIMATIONS = ['spin', 'pulse', 'shake', 'none'];
|
|
271
|
+
const DEFAULT_LOADER_CONFIG = {
|
|
272
|
+
image: '',
|
|
273
|
+
presentation: 'current',
|
|
274
|
+
animation: 'spin',
|
|
275
|
+
};
|
|
244
276
|
|
|
245
277
|
/**
|
|
246
278
|
* Constructor headless del Theme Studio: formulario curado → `ThemeFile` v2 completo (siempre
|
|
@@ -1181,14 +1213,22 @@ const MAX_DEPTH = 20;
|
|
|
1181
1213
|
/** Longitud máxima de un arreglo y de un string. */
|
|
1182
1214
|
const MAX_ARRAY_LENGTH = 40;
|
|
1183
1215
|
const MAX_STRING_LENGTH = 2048;
|
|
1184
|
-
/**
|
|
1216
|
+
/**
|
|
1217
|
+
* Error tipado del importador: `code` para traducir, `path` para diagnóstico.
|
|
1218
|
+
*
|
|
1219
|
+
* `pathVisible` indica que la ruta señala el campo exacto que hay que corregir (clave no
|
|
1220
|
+
* admitida, clave prohibida, color de marca o contraste inválido) y por eso la pantalla la
|
|
1221
|
+
* muestra a la persona usuaria; en los demás casos la ruta queda solo para diagnóstico.
|
|
1222
|
+
*/
|
|
1185
1223
|
class ThemeImportError extends Error {
|
|
1186
1224
|
code;
|
|
1187
1225
|
path;
|
|
1188
|
-
|
|
1226
|
+
pathVisible;
|
|
1227
|
+
constructor(code, path, pathVisible = false) {
|
|
1189
1228
|
super(path ? `${code} at ${path}` : code);
|
|
1190
1229
|
this.code = code;
|
|
1191
1230
|
this.path = path;
|
|
1231
|
+
this.pathVisible = pathVisible;
|
|
1192
1232
|
this.name = 'ThemeImportError';
|
|
1193
1233
|
}
|
|
1194
1234
|
}
|
|
@@ -1236,6 +1276,17 @@ function parseThemeJson(text, current, options = {}) {
|
|
|
1236
1276
|
if (meta['defaultMode'] !== undefined && meta['defaultMode'] !== 'light' && meta['defaultMode'] !== 'dark') {
|
|
1237
1277
|
throw new ThemeImportError('invalid-value', 'theme.meta.defaultMode');
|
|
1238
1278
|
}
|
|
1279
|
+
const variantKey = options.tableVariantMetaKey;
|
|
1280
|
+
if (variantKey && meta[variantKey] && !SOL_TABLE_VARIANTS.includes(meta[variantKey])) {
|
|
1281
|
+
throw new ThemeImportError('invalid-value', `theme.meta.${variantKey}`);
|
|
1282
|
+
}
|
|
1283
|
+
if (options.loader && isPlain(meta['loader'])) {
|
|
1284
|
+
const loader = meta['loader'];
|
|
1285
|
+
if (!STUDIO_LOADER_PRESENTATIONS.includes(loader['presentation']) ||
|
|
1286
|
+
!STUDIO_LOADER_ANIMATIONS.includes(loader['animation'])) {
|
|
1287
|
+
throw new ThemeImportError('invalid-value', 'theme.meta.loader');
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1239
1290
|
for (const mode of ['light', 'dark']) {
|
|
1240
1291
|
const table = readPath(parsed, ['modes', mode, 'component', 'table']);
|
|
1241
1292
|
if (isPlain(table)) {
|
|
@@ -1263,7 +1314,10 @@ function buildReference(current, options) {
|
|
|
1263
1314
|
favicon: '',
|
|
1264
1315
|
fonts: [{ family: 'Inter', provider: 'google', weights: [400] }],
|
|
1265
1316
|
logo: { ...meta['logo'], urlDark: '' },
|
|
1317
|
+
...(options.metaExtrasSchema ?? {}),
|
|
1266
1318
|
...(options.metaExtras ?? {}),
|
|
1319
|
+
...(options.loader ? { loader: { image: '', presentation: '', animation: '' } } : {}),
|
|
1320
|
+
...(options.tableVariantMetaKey ? { [options.tableVariantMetaKey]: '' } : {}),
|
|
1267
1321
|
});
|
|
1268
1322
|
const primitives = reference['primitives'];
|
|
1269
1323
|
ensure(primitives, ['size', 'control'], { touch: '' });
|
|
@@ -1310,7 +1364,8 @@ function check(value, reference, path, depth) {
|
|
|
1310
1364
|
if (!Array.isArray(reference) || value.length > MAX_ARRAY_LENGTH) {
|
|
1311
1365
|
throw new ThemeImportError('invalid-structure', path);
|
|
1312
1366
|
}
|
|
1313
|
-
|
|
1367
|
+
// Los elementos comparten la ruta del arreglo: la ruta visible nombra el campo, no la posición.
|
|
1368
|
+
value.forEach(item => check(item, reference[0], path, depth + 1));
|
|
1314
1369
|
return;
|
|
1315
1370
|
}
|
|
1316
1371
|
if (isPlain(value)) {
|
|
@@ -1319,16 +1374,16 @@ function check(value, reference, path, depth) {
|
|
|
1319
1374
|
for (const [key, item] of Object.entries(value)) {
|
|
1320
1375
|
const childPath = `${path}.${key}`;
|
|
1321
1376
|
if (FORBIDDEN_KEYS.has(key))
|
|
1322
|
-
throw new ThemeImportError('unsafe-key', childPath);
|
|
1377
|
+
throw new ThemeImportError('unsafe-key', childPath, true);
|
|
1323
1378
|
// Paleta de marca extensible: solo literales hex acotados, nunca objetos, URLs ni código.
|
|
1324
1379
|
if (path === 'theme.primitives.color.brand' && !Object.hasOwn(reference, key)) {
|
|
1325
1380
|
if (!BRAND_COLOR_KEY.test(key) || typeof item !== 'string' || !HEX_ANY.test(item)) {
|
|
1326
|
-
throw new ThemeImportError('invalid-value', childPath);
|
|
1381
|
+
throw new ThemeImportError('invalid-value', childPath, true);
|
|
1327
1382
|
}
|
|
1328
1383
|
continue;
|
|
1329
1384
|
}
|
|
1330
1385
|
if (!Object.hasOwn(reference, key))
|
|
1331
|
-
throw new ThemeImportError('unsupported-key', childPath);
|
|
1386
|
+
throw new ThemeImportError('unsupported-key', childPath, true);
|
|
1332
1387
|
check(item, reference[key], childPath, depth + 1);
|
|
1333
1388
|
}
|
|
1334
1389
|
return;
|
|
@@ -1347,7 +1402,7 @@ function check(value, reference, path, depth) {
|
|
|
1347
1402
|
throw new ThemeImportError('unsafe-value', path);
|
|
1348
1403
|
}
|
|
1349
1404
|
if (/\.semantic\.color\.(primaryContrast|secondaryContrast)$/.test(path) && !HEX_ANY.test(value)) {
|
|
1350
|
-
throw new ThemeImportError('invalid-value', path);
|
|
1405
|
+
throw new ThemeImportError('invalid-value', path, true);
|
|
1351
1406
|
}
|
|
1352
1407
|
}
|
|
1353
1408
|
}
|
|
@@ -1370,12 +1425,14 @@ function mergeThemeEditorChanges(original, before, after) {
|
|
|
1370
1425
|
}
|
|
1371
1426
|
|
|
1372
1427
|
/**
|
|
1373
|
-
* Textos por defecto en español colombiano
|
|
1374
|
-
*
|
|
1428
|
+
* Textos por defecto en español colombiano. Son los del Theme Studio de PANDORA, del que se portó
|
|
1429
|
+
* la pantalla; solo tres se dejan genéricos porque nombran un producto o su plataforma legada
|
|
1430
|
+
* (`preview.footerFallback`, `table.hint` y `loader.hint`): el host que quiera el texto propio lo
|
|
1431
|
+
* define en su motor de traducción bajo `sol.themeStudio.*`, que siempre gana sobre este respaldo.
|
|
1375
1432
|
*/
|
|
1376
1433
|
const SOL_THEME_STUDIO_I18N_ES_CO = {
|
|
1377
|
-
title: '
|
|
1378
|
-
subtitle: 'Diseña el tema: ajusta los controles y
|
|
1434
|
+
title: 'Theme Studio',
|
|
1435
|
+
subtitle: 'Diseña el tema de la entidad: ajusta los controles y previsualiza en vivo.',
|
|
1379
1436
|
state: {
|
|
1380
1437
|
loading: 'Cargando el tema actual…',
|
|
1381
1438
|
loadError: 'No fue posible cargar el tema actual.',
|
|
@@ -1390,21 +1447,21 @@ const SOL_THEME_STUDIO_I18N_ES_CO = {
|
|
|
1390
1447
|
name: 'Nombre del tema',
|
|
1391
1448
|
namePlaceholder: 'Por ejemplo, Institucional 2026',
|
|
1392
1449
|
logo: 'Logo',
|
|
1393
|
-
logoDark: 'Logo
|
|
1450
|
+
logoDark: 'Logo (modo oscuro, opcional)',
|
|
1394
1451
|
logoAlt: 'Vista previa del logo',
|
|
1395
1452
|
logoDarkAlt: 'Vista previa del logo en modo oscuro',
|
|
1396
1453
|
attach: 'Adjuntar imagen',
|
|
1397
1454
|
remove: 'Quitar',
|
|
1398
1455
|
altText: 'Texto alternativo',
|
|
1399
|
-
altTextPlaceholder: 'Nombre de la
|
|
1456
|
+
altTextPlaceholder: 'Nombre de la entidad',
|
|
1400
1457
|
width: 'Ancho del logo',
|
|
1401
1458
|
favicon: 'Favicon',
|
|
1402
1459
|
faviconAlt: 'Vista previa del favicon',
|
|
1403
|
-
faviconHint: '
|
|
1460
|
+
faviconHint: 'Icono de la pestaña del navegador. Usa una imagen cuadrada (PNG, SVG o ICO).',
|
|
1404
1461
|
uploadUnavailable: 'La carga de imágenes no está disponible en esta aplicación.',
|
|
1405
1462
|
sizeError: 'La imagen no puede superar 2 MB. Elige un archivo más liviano.',
|
|
1406
|
-
uploadError: 'No se pudo subir
|
|
1407
|
-
uploaded: '
|
|
1463
|
+
uploadError: 'No se pudo subir el logo. Intenta de nuevo.',
|
|
1464
|
+
uploaded: 'Logo actualizado.',
|
|
1408
1465
|
},
|
|
1409
1466
|
footer: { title: 'Pie de página', text: 'Texto del pie de página (opcional)', placeholder: 'Frase de marca' },
|
|
1410
1467
|
auth: {
|
|
@@ -1414,53 +1471,69 @@ const SOL_THEME_STUDIO_I18N_ES_CO = {
|
|
|
1414
1471
|
layoutSplitLeft: 'Partido a la izquierda',
|
|
1415
1472
|
layoutSplitRight: 'Partido a la derecha',
|
|
1416
1473
|
},
|
|
1417
|
-
defaultMode: { title: 'Modo por defecto', light: 'Claro', dark: 'Oscuro' },
|
|
1474
|
+
defaultMode: { title: 'Modo por defecto de la entidad', light: 'Claro', dark: 'Oscuro' },
|
|
1418
1475
|
table: {
|
|
1419
1476
|
title: 'Tablas',
|
|
1420
1477
|
variant: 'Estilo de tabla',
|
|
1421
|
-
hint: 'Los colores
|
|
1478
|
+
hint: 'Presets tipo Word para las tablas. Los colores derivan del tema, así que reaccionan al modo claro y oscuro.',
|
|
1422
1479
|
clean: 'Limpia',
|
|
1423
1480
|
zebra: 'Filas alternas',
|
|
1424
1481
|
bordered: 'Con bordes',
|
|
1425
1482
|
emphasisHeader: 'Encabezado enfatizado',
|
|
1426
1483
|
banded: 'Banda intermedia',
|
|
1427
1484
|
},
|
|
1485
|
+
loader: {
|
|
1486
|
+
title: 'Loader / spinner',
|
|
1487
|
+
image: 'Imagen del spinner',
|
|
1488
|
+
imageAlt: 'Vista previa del spinner',
|
|
1489
|
+
presentation: 'Presentación',
|
|
1490
|
+
presentationCurrent: 'Como está',
|
|
1491
|
+
presentationCentered: 'Centrado',
|
|
1492
|
+
presentationBackdrop: 'Con cortina (blur)',
|
|
1493
|
+
animation: 'Animación',
|
|
1494
|
+
animationSpin: 'Giro',
|
|
1495
|
+
animationPulse: 'Latido',
|
|
1496
|
+
animationShake: 'Sacudida',
|
|
1497
|
+
animationNone: 'Ninguna',
|
|
1498
|
+
hint: 'Reemplaza los indicadores de carga de la aplicación. Sin imagen se usa un anillo con el color del tema.',
|
|
1499
|
+
},
|
|
1428
1500
|
color: {
|
|
1429
1501
|
title: 'Color',
|
|
1430
1502
|
primary: 'Color primario',
|
|
1431
1503
|
accent: 'Color de acento',
|
|
1504
|
+
accentHint: 'En esta versión de la librería, ningún componente lo usa de forma directa: solo alimenta la paleta de las gráficas del Studio.',
|
|
1432
1505
|
pageBg: 'Fondo de página',
|
|
1433
1506
|
surfaceBg: 'Fondo de superficies (barra lateral, tarjetas y encabezado)',
|
|
1434
1507
|
secondary: 'Color secundario (botones como Cancelar)',
|
|
1435
1508
|
text: 'Color del texto',
|
|
1436
|
-
textHint: '
|
|
1509
|
+
textHint: 'Color del texto normal (párrafos, tablas, etiquetas). Los títulos y los botones usan el color primario.',
|
|
1437
1510
|
},
|
|
1438
1511
|
stateColor: {
|
|
1439
1512
|
title: 'Roles de estado',
|
|
1440
1513
|
success: 'Éxito',
|
|
1441
|
-
successHint: 'Insignias, notificaciones y
|
|
1514
|
+
successHint: 'Insignias, notificaciones y el paso completado del stepper en tono de éxito.',
|
|
1442
1515
|
warning: 'Advertencia',
|
|
1443
|
-
warningHint: 'Insignias y notificaciones de advertencia.',
|
|
1516
|
+
warningHint: 'Insignias y notificaciones en tono de advertencia.',
|
|
1444
1517
|
danger: 'Peligro',
|
|
1445
|
-
dangerHint: 'Insignias, notificaciones y botones de
|
|
1518
|
+
dangerHint: 'Insignias, notificaciones y los botones "variant=danger" en tono de peligro.',
|
|
1446
1519
|
info: 'Información',
|
|
1447
|
-
infoHint: 'Insignias y notificaciones
|
|
1520
|
+
infoHint: 'Insignias y notificaciones en tono informativo.',
|
|
1448
1521
|
},
|
|
1449
1522
|
typography: {
|
|
1450
1523
|
title: 'Tipografía',
|
|
1451
1524
|
display: 'Fuente de titulares',
|
|
1452
1525
|
body: 'Fuente de texto',
|
|
1453
|
-
moreFonts: 'Más fuentes',
|
|
1526
|
+
moreFonts: 'Más fuentes…',
|
|
1454
1527
|
weight: 'Peso de titulares',
|
|
1455
|
-
weightAuto: '
|
|
1528
|
+
weightAuto: 'Auto',
|
|
1456
1529
|
weight600: '600',
|
|
1457
1530
|
weight700: '700',
|
|
1458
1531
|
weight800: '800',
|
|
1459
1532
|
transform: 'Mayúsculas en titulares',
|
|
1460
|
-
transformAuto: '
|
|
1533
|
+
transformAuto: 'Auto',
|
|
1461
1534
|
transformNone: 'Normal',
|
|
1462
1535
|
transformUpper: 'MAYÚSCULAS',
|
|
1463
|
-
baseSize: 'Tamaño del texto',
|
|
1536
|
+
baseSize: 'Tamaño del texto (cuerpo)',
|
|
1464
1537
|
lineHeight: 'Interlineado',
|
|
1465
1538
|
},
|
|
1466
1539
|
shape: {
|
|
@@ -1543,15 +1616,15 @@ const SOL_THEME_STUDIO_I18N_ES_CO = {
|
|
|
1543
1616
|
intensityExpressive: 'Expresiva',
|
|
1544
1617
|
reveal: 'Animación de entrada',
|
|
1545
1618
|
revealRise: 'Sube',
|
|
1546
|
-
revealFade: '
|
|
1547
|
-
revealPop: '
|
|
1548
|
-
revealSlide: '
|
|
1549
|
-
revealZoom: '
|
|
1619
|
+
revealFade: 'Fade',
|
|
1620
|
+
revealPop: 'Pop',
|
|
1621
|
+
revealSlide: 'Deslizar',
|
|
1622
|
+
revealZoom: 'Zoom',
|
|
1550
1623
|
duration: 'Duración',
|
|
1551
1624
|
durationFast: 'Rápida',
|
|
1552
1625
|
durationNormal: 'Normal',
|
|
1553
1626
|
durationSlow: 'Lenta',
|
|
1554
|
-
overlayBlur: 'Desenfoque tras
|
|
1627
|
+
overlayBlur: 'Desenfoque tras modales y paneles',
|
|
1555
1628
|
overlayNone: 'Ninguno',
|
|
1556
1629
|
overlaySoft: 'Suave',
|
|
1557
1630
|
overlayMedium: 'Medio',
|
|
@@ -1562,6 +1635,7 @@ const SOL_THEME_STUDIO_I18N_ES_CO = {
|
|
|
1562
1635
|
modeLight: 'Modo claro',
|
|
1563
1636
|
modeDark: 'Modo oscuro',
|
|
1564
1637
|
open: 'Ver vista previa',
|
|
1638
|
+
close: 'Cerrar vista previa',
|
|
1565
1639
|
resize: 'Ajustar el ancho de la vista previa',
|
|
1566
1640
|
brand: 'Tu marca',
|
|
1567
1641
|
title: 'Panel de control',
|
|
@@ -1570,15 +1644,16 @@ const SOL_THEME_STUDIO_I18N_ES_CO = {
|
|
|
1570
1644
|
navUsers: 'Usuarios',
|
|
1571
1645
|
statRequests: 'Solicitudes del mes',
|
|
1572
1646
|
statBudget: 'Presupuesto ejecutado',
|
|
1647
|
+
statBudgetValue: '$4.2M',
|
|
1573
1648
|
inputLabel: 'Nombre del cliente',
|
|
1574
|
-
inputPlaceholder: 'Escribe un nombre',
|
|
1575
|
-
primaryAction: '
|
|
1649
|
+
inputPlaceholder: 'Escribe un nombre…',
|
|
1650
|
+
primaryAction: 'Agendar cita',
|
|
1576
1651
|
ghostAction: 'Cancelar',
|
|
1577
1652
|
chipActive: 'Activa',
|
|
1578
1653
|
chipNew: 'Nueva',
|
|
1579
1654
|
chipPending: 'Pendiente',
|
|
1580
|
-
footerFallback: '
|
|
1581
|
-
rolesHeading: '
|
|
1655
|
+
footerFallback: '© Hecho con ❤ en tu entidad',
|
|
1656
|
+
rolesHeading: 'Ejemplos de botones por rol',
|
|
1582
1657
|
roleBtnPrimary: 'Primario',
|
|
1583
1658
|
roleBtnSecondary: 'Secundario',
|
|
1584
1659
|
roleBtnSuccess: 'Éxito',
|
|
@@ -1586,70 +1661,74 @@ const SOL_THEME_STUDIO_I18N_ES_CO = {
|
|
|
1586
1661
|
roleBtnDanger: 'Peligro',
|
|
1587
1662
|
roleBtnInfo: 'Información',
|
|
1588
1663
|
bodyTextHeading: 'Gestión documental',
|
|
1589
|
-
bodyTextParagraph: 'Un flujo bien parametrizado reduce los tiempos de búsqueda y refuerza la trazabilidad de cada expediente.',
|
|
1664
|
+
bodyTextParagraph: 'La gestión documental organiza la creación, el trámite, la consulta y la disposición final de los documentos de la entidad. Un flujo bien parametrizado reduce los tiempos de búsqueda y refuerza la trazabilidad de cada expediente.',
|
|
1590
1665
|
tableSample: 'Tabla de ejemplo',
|
|
1591
1666
|
tableColName: 'Nombre',
|
|
1592
1667
|
tableColRole: 'Rol',
|
|
1593
1668
|
tableColState: 'Estado',
|
|
1669
|
+
loaderSample: 'Loader / spinner',
|
|
1594
1670
|
},
|
|
1595
1671
|
actions: {
|
|
1596
1672
|
apply: 'Aplicar tema',
|
|
1597
1673
|
copy: 'Copiar JSON',
|
|
1598
1674
|
export: 'Exportar JSON',
|
|
1599
1675
|
import: 'Cargar JSON y previsualizar',
|
|
1600
|
-
jsonHint: 'JSON
|
|
1676
|
+
jsonHint: 'JSON hasta 256 KB. Los cambios solo se guardan al confirmar Aplicar tema.',
|
|
1601
1677
|
},
|
|
1602
1678
|
confirm: {
|
|
1603
1679
|
title: '¿Aplicar este tema?',
|
|
1604
|
-
message: 'El tema se aplicará
|
|
1680
|
+
message: 'El tema se aplicará a toda la entidad y lo verán todos los usuarios. Puedes volver a cambiarlo cuando quieras.',
|
|
1605
1681
|
confirm: 'Aplicar tema',
|
|
1606
1682
|
cancel: 'Cancelar',
|
|
1607
1683
|
},
|
|
1608
1684
|
history: {
|
|
1685
|
+
ariaLabel: 'Versiones del tema',
|
|
1609
1686
|
toggle: 'Versiones anteriores',
|
|
1610
|
-
hint: '
|
|
1687
|
+
hint: 'Seleccione Previsualizar para cargar todos los controles y la vista previa. Solo Aplicar tema guarda una nueva versión.',
|
|
1611
1688
|
loading: 'Cargando versiones…',
|
|
1612
|
-
error: 'No fue posible cargar el historial.',
|
|
1689
|
+
error: 'No fue posible cargar el historial. Reintente.',
|
|
1613
1690
|
retry: 'Reintentar',
|
|
1614
|
-
empty: 'Aún no hay versiones guardadas. Al aplicar, el tema actual
|
|
1691
|
+
empty: 'Aún no hay versiones guardadas. Al aplicar, también se conservará el tema actual como captura inicial.',
|
|
1615
1692
|
version: 'Versión {{id}}',
|
|
1616
1693
|
initialCapture: 'Captura del tema previo: autor y fecha originales no disponibles',
|
|
1617
1694
|
unknownUser: 'Autor no disponible',
|
|
1618
|
-
basedOn: 'Basada en
|
|
1695
|
+
basedOn: 'Basada en versión {{id}}',
|
|
1619
1696
|
preview: 'Previsualizar',
|
|
1620
1697
|
loadMore: 'Ver más versiones',
|
|
1621
|
-
versionLoading: 'Cargando
|
|
1622
|
-
versionError: 'No fue posible cargar la versión.
|
|
1623
|
-
|
|
1698
|
+
versionLoading: 'Cargando plantilla en el formulario y la vista previa…',
|
|
1699
|
+
versionError: 'No fue posible cargar la versión. El borrador se conserva.',
|
|
1700
|
+
versionInvalid: 'La versión no se puede previsualizar.',
|
|
1701
|
+
versionLoaded: 'Versión {{id}} precargada en los controles y la vista previa. Confirme Aplicar tema para aceptarla; se guardará como nueva versión.',
|
|
1624
1702
|
},
|
|
1625
1703
|
import: {
|
|
1626
|
-
loaded: 'JSON
|
|
1627
|
-
exported: 'Archivo exportado.',
|
|
1628
|
-
readError: 'No fue posible leer el archivo.
|
|
1704
|
+
loaded: 'JSON importado al borrador. Revise ambos modos en la vista previa; todavía no se guardó en la entidad.',
|
|
1705
|
+
exported: 'Archivo exportado. Conserve una copia antes de modificarlo.',
|
|
1706
|
+
readError: 'No fue posible leer el archivo. Vuelva a seleccionarlo.',
|
|
1629
1707
|
error: {
|
|
1708
|
+
at: ' en {{path}}',
|
|
1630
1709
|
'too-large': 'El archivo supera el límite de 256 KB.',
|
|
1631
|
-
'invalid-json': 'El archivo no contiene JSON válido.
|
|
1632
|
-
'invalid-structure': 'El archivo no
|
|
1633
|
-
'unsupported-key': 'El archivo
|
|
1634
|
-
'unsafe-key': 'El archivo
|
|
1635
|
-
'unsafe-value': 'El archivo
|
|
1636
|
-
'invalid-value': 'El archivo
|
|
1637
|
-
'not-renderable': 'El
|
|
1710
|
+
'invalid-json': 'El archivo no contiene JSON válido. Revise comas y comillas.',
|
|
1711
|
+
'invalid-structure': 'El archivo no cumple el formato del tema{{at}}. Exporte el JSON actual y conserve su estructura.',
|
|
1712
|
+
'unsupported-key': 'El archivo no cumple el formato del tema{{at}}. Exporte el JSON actual y conserve su estructura.',
|
|
1713
|
+
'unsafe-key': 'El archivo no cumple el formato del tema{{at}}. Exporte el JSON actual y conserve su estructura.',
|
|
1714
|
+
'unsafe-value': 'El archivo no cumple el formato del tema{{at}}. Exporte el JSON actual y conserve su estructura.',
|
|
1715
|
+
'invalid-value': 'El archivo no cumple el formato del tema{{at}}. Exporte el JSON actual y conserve su estructura.',
|
|
1716
|
+
'not-renderable': 'El archivo no cumple el formato del tema{{at}}. Exporte el JSON actual y conserve su estructura.',
|
|
1638
1717
|
},
|
|
1639
1718
|
},
|
|
1640
1719
|
alerts: {
|
|
1641
1720
|
invalidTheme: 'El tema no es válido y no se puede aplicar.',
|
|
1642
|
-
invalidHex: 'Ingresa un color hexadecimal válido,
|
|
1721
|
+
invalidHex: 'Ingresa un color hexadecimal válido, p. ej. #2563EB.',
|
|
1643
1722
|
applied: 'Tema aplicado correctamente.',
|
|
1644
1723
|
applyError: 'No se pudo aplicar el tema. Intenta de nuevo.',
|
|
1645
1724
|
copied: 'JSON del tema copiado al portapapeles.',
|
|
1646
|
-
copyError: 'No se pudo copiar el JSON.
|
|
1725
|
+
copyError: 'No se pudo copiar el JSON. Copia manualmente desde la consola del navegador.',
|
|
1647
1726
|
},
|
|
1648
1727
|
};
|
|
1649
1728
|
/** Default English texts (same tree as `SOL_THEME_STUDIO_I18N_ES_CO`). */
|
|
1650
1729
|
const SOL_THEME_STUDIO_I18N_EN = {
|
|
1651
|
-
title: 'Theme
|
|
1652
|
-
subtitle:
|
|
1730
|
+
title: 'Theme Studio',
|
|
1731
|
+
subtitle: "Design the organization's theme: adjust the controls and preview it live.",
|
|
1653
1732
|
state: {
|
|
1654
1733
|
loading: 'Loading the current theme…',
|
|
1655
1734
|
loadError: 'The current theme could not be loaded.',
|
|
@@ -1664,7 +1743,7 @@ const SOL_THEME_STUDIO_I18N_EN = {
|
|
|
1664
1743
|
name: 'Theme name',
|
|
1665
1744
|
namePlaceholder: 'For example, Corporate 2026',
|
|
1666
1745
|
logo: 'Logo',
|
|
1667
|
-
logoDark: '
|
|
1746
|
+
logoDark: 'Logo (dark mode, optional)',
|
|
1668
1747
|
logoAlt: 'Logo preview',
|
|
1669
1748
|
logoDarkAlt: 'Dark mode logo preview',
|
|
1670
1749
|
attach: 'Attach image',
|
|
@@ -1674,11 +1753,11 @@ const SOL_THEME_STUDIO_I18N_EN = {
|
|
|
1674
1753
|
width: 'Logo width',
|
|
1675
1754
|
favicon: 'Favicon',
|
|
1676
1755
|
faviconAlt: 'Favicon preview',
|
|
1677
|
-
faviconHint: 'Browser tab icon. Use a square image (PNG, SVG or ICO).
|
|
1756
|
+
faviconHint: 'Browser tab icon. Use a square image (PNG, SVG or ICO).',
|
|
1678
1757
|
uploadUnavailable: 'Image upload is not available in this application.',
|
|
1679
1758
|
sizeError: 'The image cannot exceed 2 MB. Choose a lighter file.',
|
|
1680
|
-
uploadError: 'The
|
|
1681
|
-
uploaded: '
|
|
1759
|
+
uploadError: 'The logo could not be uploaded. Try again.',
|
|
1760
|
+
uploaded: 'Logo updated.',
|
|
1682
1761
|
},
|
|
1683
1762
|
footer: { title: 'Footer', text: 'Footer text (optional)', placeholder: 'Brand phrase' },
|
|
1684
1763
|
auth: {
|
|
@@ -1688,53 +1767,69 @@ const SOL_THEME_STUDIO_I18N_EN = {
|
|
|
1688
1767
|
layoutSplitLeft: 'Split left',
|
|
1689
1768
|
layoutSplitRight: 'Split right',
|
|
1690
1769
|
},
|
|
1691
|
-
defaultMode: { title: '
|
|
1770
|
+
defaultMode: { title: "Organization's default mode", light: 'Light', dark: 'Dark' },
|
|
1692
1771
|
table: {
|
|
1693
1772
|
title: 'Tables',
|
|
1694
1773
|
variant: 'Table style',
|
|
1695
|
-
hint: 'Colors
|
|
1774
|
+
hint: 'Word-like presets for tables. Colors derive from the theme, so they follow light and dark modes.',
|
|
1696
1775
|
clean: 'Clean',
|
|
1697
1776
|
zebra: 'Striped rows',
|
|
1698
1777
|
bordered: 'Bordered',
|
|
1699
1778
|
emphasisHeader: 'Emphasized header',
|
|
1700
1779
|
banded: 'Banded',
|
|
1701
1780
|
},
|
|
1781
|
+
loader: {
|
|
1782
|
+
title: 'Loader / spinner',
|
|
1783
|
+
image: 'Spinner image',
|
|
1784
|
+
imageAlt: 'Spinner preview',
|
|
1785
|
+
presentation: 'Presentation',
|
|
1786
|
+
presentationCurrent: 'As is',
|
|
1787
|
+
presentationCentered: 'Centered',
|
|
1788
|
+
presentationBackdrop: 'With backdrop (blur)',
|
|
1789
|
+
animation: 'Animation',
|
|
1790
|
+
animationSpin: 'Spin',
|
|
1791
|
+
animationPulse: 'Pulse',
|
|
1792
|
+
animationShake: 'Shake',
|
|
1793
|
+
animationNone: 'None',
|
|
1794
|
+
hint: "Replaces the application's loading indicators. Without an image a ring in the theme color is used.",
|
|
1795
|
+
},
|
|
1702
1796
|
color: {
|
|
1703
1797
|
title: 'Color',
|
|
1704
1798
|
primary: 'Primary color',
|
|
1705
1799
|
accent: 'Accent color',
|
|
1800
|
+
accentHint: 'In this library version no component uses it directly: it only feeds the Studio chart palette.',
|
|
1706
1801
|
pageBg: 'Page background',
|
|
1707
1802
|
surfaceBg: 'Surface background (sidebar, cards and header)',
|
|
1708
1803
|
secondary: 'Secondary color (Cancel-style buttons)',
|
|
1709
1804
|
text: 'Text color',
|
|
1710
|
-
textHint: 'Body text (paragraphs, tables, labels). Titles and buttons use the primary color.',
|
|
1805
|
+
textHint: 'Body text color (paragraphs, tables, labels). Titles and buttons use the primary color.',
|
|
1711
1806
|
},
|
|
1712
1807
|
stateColor: {
|
|
1713
1808
|
title: 'State roles',
|
|
1714
1809
|
success: 'Success',
|
|
1715
|
-
successHint: 'Badges, notifications and completed
|
|
1810
|
+
successHint: 'Badges, notifications and the completed stepper step in a success tone.',
|
|
1716
1811
|
warning: 'Warning',
|
|
1717
|
-
warningHint: '
|
|
1812
|
+
warningHint: 'Badges and notifications in a warning tone.',
|
|
1718
1813
|
danger: 'Danger',
|
|
1719
|
-
dangerHint: 'Badges, notifications and
|
|
1814
|
+
dangerHint: 'Badges, notifications and "variant=danger" buttons in a danger tone.',
|
|
1720
1815
|
info: 'Information',
|
|
1721
|
-
infoHint: '
|
|
1816
|
+
infoHint: 'Badges and notifications in an informational tone.',
|
|
1722
1817
|
},
|
|
1723
1818
|
typography: {
|
|
1724
1819
|
title: 'Typography',
|
|
1725
1820
|
display: 'Heading font',
|
|
1726
1821
|
body: 'Body font',
|
|
1727
|
-
moreFonts: 'More fonts',
|
|
1822
|
+
moreFonts: 'More fonts…',
|
|
1728
1823
|
weight: 'Heading weight',
|
|
1729
|
-
weightAuto: '
|
|
1824
|
+
weightAuto: 'Auto',
|
|
1730
1825
|
weight600: '600',
|
|
1731
1826
|
weight700: '700',
|
|
1732
1827
|
weight800: '800',
|
|
1733
1828
|
transform: 'Heading case',
|
|
1734
|
-
transformAuto: '
|
|
1829
|
+
transformAuto: 'Auto',
|
|
1735
1830
|
transformNone: 'Normal',
|
|
1736
1831
|
transformUpper: 'UPPERCASE',
|
|
1737
|
-
baseSize: 'Text size',
|
|
1832
|
+
baseSize: 'Text size (body)',
|
|
1738
1833
|
lineHeight: 'Line height',
|
|
1739
1834
|
},
|
|
1740
1835
|
shape: {
|
|
@@ -1836,6 +1931,7 @@ const SOL_THEME_STUDIO_I18N_EN = {
|
|
|
1836
1931
|
modeLight: 'Light mode',
|
|
1837
1932
|
modeDark: 'Dark mode',
|
|
1838
1933
|
open: 'Open preview',
|
|
1934
|
+
close: 'Close preview',
|
|
1839
1935
|
resize: 'Adjust the preview width',
|
|
1840
1936
|
brand: 'Your brand',
|
|
1841
1937
|
title: 'Dashboard',
|
|
@@ -1844,15 +1940,16 @@ const SOL_THEME_STUDIO_I18N_EN = {
|
|
|
1844
1940
|
navUsers: 'Users',
|
|
1845
1941
|
statRequests: 'Requests this month',
|
|
1846
1942
|
statBudget: 'Budget executed',
|
|
1943
|
+
statBudgetValue: '$4.2M',
|
|
1847
1944
|
inputLabel: 'Customer name',
|
|
1848
|
-
inputPlaceholder: 'Type a name',
|
|
1849
|
-
primaryAction: '
|
|
1945
|
+
inputPlaceholder: 'Type a name…',
|
|
1946
|
+
primaryAction: 'Book appointment',
|
|
1850
1947
|
ghostAction: 'Cancel',
|
|
1851
1948
|
chipActive: 'Active',
|
|
1852
1949
|
chipNew: 'New',
|
|
1853
1950
|
chipPending: 'Pending',
|
|
1854
|
-
footerFallback: '
|
|
1855
|
-
rolesHeading: '
|
|
1951
|
+
footerFallback: '© Made with ❤ at your organization',
|
|
1952
|
+
rolesHeading: 'Button examples by role',
|
|
1856
1953
|
roleBtnPrimary: 'Primary',
|
|
1857
1954
|
roleBtnSecondary: 'Secondary',
|
|
1858
1955
|
roleBtnSuccess: 'Success',
|
|
@@ -1860,11 +1957,12 @@ const SOL_THEME_STUDIO_I18N_EN = {
|
|
|
1860
1957
|
roleBtnDanger: 'Danger',
|
|
1861
1958
|
roleBtnInfo: 'Information',
|
|
1862
1959
|
bodyTextHeading: 'Records management',
|
|
1863
|
-
bodyTextParagraph: 'A well configured workflow shortens search times and strengthens the traceability of every record.',
|
|
1960
|
+
bodyTextParagraph: 'Records management organizes how documents are created, processed, consulted and finally disposed of. A well configured workflow shortens search times and strengthens the traceability of every record.',
|
|
1864
1961
|
tableSample: 'Sample table',
|
|
1865
1962
|
tableColName: 'Name',
|
|
1866
1963
|
tableColRole: 'Role',
|
|
1867
1964
|
tableColState: 'Status',
|
|
1965
|
+
loaderSample: 'Loader / spinner',
|
|
1868
1966
|
},
|
|
1869
1967
|
actions: {
|
|
1870
1968
|
apply: 'Apply theme',
|
|
@@ -1875,49 +1973,52 @@ const SOL_THEME_STUDIO_I18N_EN = {
|
|
|
1875
1973
|
},
|
|
1876
1974
|
confirm: {
|
|
1877
1975
|
title: 'Apply this theme?',
|
|
1878
|
-
message: 'The theme will apply to every user. You can change it again at any time.',
|
|
1976
|
+
message: 'The theme will apply to the whole organization and every user will see it. You can change it again at any time.',
|
|
1879
1977
|
confirm: 'Apply theme',
|
|
1880
1978
|
cancel: 'Cancel',
|
|
1881
1979
|
},
|
|
1882
1980
|
history: {
|
|
1981
|
+
ariaLabel: 'Theme versions',
|
|
1883
1982
|
toggle: 'Previous versions',
|
|
1884
|
-
hint: 'Choose Preview to load
|
|
1983
|
+
hint: 'Choose Preview to load all the controls and the preview. Only Apply theme saves a new version.',
|
|
1885
1984
|
loading: 'Loading versions…',
|
|
1886
|
-
error: 'The history could not be loaded.',
|
|
1985
|
+
error: 'The history could not be loaded. Try again.',
|
|
1887
1986
|
retry: 'Retry',
|
|
1888
|
-
empty: 'There are no saved versions yet. When you apply, the current theme
|
|
1987
|
+
empty: 'There are no saved versions yet. When you apply, the current theme is also kept as the initial capture.',
|
|
1889
1988
|
version: 'Version {{id}}',
|
|
1890
1989
|
initialCapture: 'Capture of the previous theme: original author and date unavailable',
|
|
1891
1990
|
unknownUser: 'Author unavailable',
|
|
1892
1991
|
basedOn: 'Based on version {{id}}',
|
|
1893
1992
|
preview: 'Preview',
|
|
1894
1993
|
loadMore: 'Load more versions',
|
|
1895
|
-
versionLoading: 'Loading the
|
|
1994
|
+
versionLoading: 'Loading the template into the form and the preview…',
|
|
1896
1995
|
versionError: 'The version could not be loaded. Your draft is kept.',
|
|
1897
|
-
|
|
1996
|
+
versionInvalid: 'The version cannot be previewed.',
|
|
1997
|
+
versionLoaded: 'Version {{id}} loaded into the controls and the preview. Confirm Apply theme to accept it; it will be saved as a new version.',
|
|
1898
1998
|
},
|
|
1899
1999
|
import: {
|
|
1900
|
-
loaded: 'JSON
|
|
1901
|
-
exported: 'File exported.',
|
|
2000
|
+
loaded: 'JSON imported into the draft. Review both modes in the preview; it has not been saved yet.',
|
|
2001
|
+
exported: 'File exported. Keep a copy before modifying it.',
|
|
1902
2002
|
readError: 'The file could not be read. Select it again.',
|
|
1903
2003
|
error: {
|
|
2004
|
+
at: ' at {{path}}',
|
|
1904
2005
|
'too-large': 'The file exceeds the 256 KB limit.',
|
|
1905
2006
|
'invalid-json': 'The file does not contain valid JSON. Check commas and quotes.',
|
|
1906
|
-
'invalid-structure': 'The file does not
|
|
1907
|
-
'unsupported-key': 'The file
|
|
1908
|
-
'unsafe-key': 'The file
|
|
1909
|
-
'unsafe-value': 'The file
|
|
1910
|
-
'invalid-value': 'The file
|
|
1911
|
-
'not-renderable': 'The
|
|
2007
|
+
'invalid-structure': 'The file does not match the theme format{{at}}. Export the current JSON and keep its structure.',
|
|
2008
|
+
'unsupported-key': 'The file does not match the theme format{{at}}. Export the current JSON and keep its structure.',
|
|
2009
|
+
'unsafe-key': 'The file does not match the theme format{{at}}. Export the current JSON and keep its structure.',
|
|
2010
|
+
'unsafe-value': 'The file does not match the theme format{{at}}. Export the current JSON and keep its structure.',
|
|
2011
|
+
'invalid-value': 'The file does not match the theme format{{at}}. Export the current JSON and keep its structure.',
|
|
2012
|
+
'not-renderable': 'The file does not match the theme format{{at}}. Export the current JSON and keep its structure.',
|
|
1912
2013
|
},
|
|
1913
2014
|
},
|
|
1914
2015
|
alerts: {
|
|
1915
2016
|
invalidTheme: 'The theme is not valid and cannot be applied.',
|
|
1916
|
-
invalidHex: 'Enter a valid hexadecimal color,
|
|
2017
|
+
invalidHex: 'Enter a valid hexadecimal color, e.g. #2563EB.',
|
|
1917
2018
|
applied: 'Theme applied successfully.',
|
|
1918
2019
|
applyError: 'The theme could not be applied. Try again.',
|
|
1919
2020
|
copied: 'Theme JSON copied to the clipboard.',
|
|
1920
|
-
copyError: 'The JSON could not be copied.
|
|
2021
|
+
copyError: 'The JSON could not be copied. Copy it manually from the browser console.',
|
|
1921
2022
|
},
|
|
1922
2023
|
};
|
|
1923
2024
|
/** Prefijo de todas las claves de la pantalla en el motor de traducción del host. */
|
|
@@ -1957,7 +2058,8 @@ function injectThemeStudioText() {
|
|
|
1957
2058
|
|
|
1958
2059
|
/**
|
|
1959
2060
|
* Vista previa aislada del tema EN EDICIÓN: un mini panel (barra lateral, indicadores, campo,
|
|
1960
|
-
* botones, chips, texto
|
|
2061
|
+
* botones, botones por rol, chips, texto, tabla y, si el host activa la sección, el indicador de
|
|
2062
|
+
* carga) pintado con las variables del tema que se está editando.
|
|
1961
2063
|
*
|
|
1962
2064
|
* `resolveCssVars(theme, mode)` produce el mapa `--sol-*` y un effect lo aplica sobre el HOST del
|
|
1963
2065
|
* componente: las custom properties heredan hacia abajo, así que solo el mock queda tematizado y
|
|
@@ -1981,7 +2083,13 @@ class SolThemeStudioPreviewComponent {
|
|
|
1981
2083
|
/** Variante de tabla de la muestra. */
|
|
1982
2084
|
tableVariant = input(null, /* @ts-ignore */
|
|
1983
2085
|
...(ngDevMode ? [{ debugName: "tableVariant" }] : /* istanbul ignore next */ []));
|
|
1984
|
-
/**
|
|
2086
|
+
/** Indicador de carga en edición; sin él no se muestra su muestra. */
|
|
2087
|
+
loader = input(undefined, /* @ts-ignore */
|
|
2088
|
+
...(ngDevMode ? [{ debugName: "loader" }] : /* istanbul ignore next */ []));
|
|
2089
|
+
/**
|
|
2090
|
+
* URL del logo del modo de la vista previa, SANITIZADA. En modo oscuro usa `urlDark` cuando
|
|
2091
|
+
* existe; sin URL segura se muestra el texto de respaldo.
|
|
2092
|
+
*/
|
|
1985
2093
|
logoUrl = computed(() => {
|
|
1986
2094
|
const brand = this.brand();
|
|
1987
2095
|
if (!brand)
|
|
@@ -1991,6 +2099,9 @@ class SolThemeStudioPreviewComponent {
|
|
|
1991
2099
|
return this.mode() === 'dark' && dark ? dark : light;
|
|
1992
2100
|
}, /* @ts-ignore */
|
|
1993
2101
|
...(ngDevMode ? [{ debugName: "logoUrl" }] : /* istanbul ignore next */ []));
|
|
2102
|
+
/** Ancho del logo (control «Ancho del logo»), como techo del ancho derivado. */
|
|
2103
|
+
logoWidth = computed(() => `${this.brand()?.width ?? 120}px`, /* @ts-ignore */
|
|
2104
|
+
...(ngDevMode ? [{ debugName: "logoWidth" }] : /* istanbul ignore next */ []));
|
|
1994
2105
|
sampleRows = [
|
|
1995
2106
|
{ name: 'Ana Prado', stateKey: 'preview.chipActive' },
|
|
1996
2107
|
{ name: 'Beto Ríos', stateKey: 'preview.chipActive' },
|
|
@@ -2012,22 +2123,31 @@ class SolThemeStudioPreviewComponent {
|
|
|
2012
2123
|
for (const [name, value] of vars) {
|
|
2013
2124
|
style.setProperty(name, value);
|
|
2014
2125
|
}
|
|
2126
|
+
// La imagen y la animación del indicador de carga no son tokens de la EMIT_TABLE.
|
|
2127
|
+
const loader = this.loader();
|
|
2128
|
+
if (loader) {
|
|
2129
|
+
const image = sanitizeAssetUrl(loader.image);
|
|
2130
|
+
style.setProperty('--sol-loader-image', image ? `url("${image}")` : 'none');
|
|
2131
|
+
style.setProperty('--sol-loader-animation-name', loader.animation === 'none' ? 'none' : `sol-loader-${loader.animation}`);
|
|
2132
|
+
}
|
|
2015
2133
|
});
|
|
2016
2134
|
}
|
|
2017
2135
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolThemeStudioPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2018
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SolThemeStudioPreviewComponent, isStandalone: true, selector: "sol-theme-studio-preview", inputs: { theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, brand: { classPropertyName: "brand", publicName: "brand", isSignal: true, isRequired: false, transformFunction: null }, tagline: { classPropertyName: "tagline", publicName: "tagline", isSignal: true, isRequired: false, transformFunction: null }, tableVariant: { classPropertyName: "tableVariant", publicName: "tableVariant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-mode": "mode()", "attr.data-variant": "tableVariant()" } }, ngImport: i0, template: `
|
|
2136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SolThemeStudioPreviewComponent, isStandalone: true, selector: "sol-theme-studio-preview", inputs: { theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, brand: { classPropertyName: "brand", publicName: "brand", isSignal: true, isRequired: false, transformFunction: null }, tagline: { classPropertyName: "tagline", publicName: "tagline", isSignal: true, isRequired: false, transformFunction: null }, tableVariant: { classPropertyName: "tableVariant", publicName: "tableVariant", isSignal: true, isRequired: false, transformFunction: null }, loader: { classPropertyName: "loader", publicName: "loader", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-mode": "mode()", "class.is-dark": "mode() === 'dark'", "attr.data-variant": "tableVariant()", "attr.data-sol-table": "tableVariant()", "attr.data-sol-loader": "loader()?.presentation ?? 'current'" } }, ngImport: i0, template: `
|
|
2019
2137
|
<div class="preview-page" data-testid="preview-page">
|
|
2020
|
-
<aside class="preview-sidebar">
|
|
2138
|
+
<aside class="preview-sidebar" data-testid="preview-sidebar">
|
|
2021
2139
|
<div class="brand-row" data-testid="preview-brand">
|
|
2022
2140
|
@if (logoUrl(); as url) {
|
|
2023
|
-
<
|
|
2141
|
+
<span class="preview-brand-logo">
|
|
2142
|
+
<img class="brand-logo-img" [src]="url" [alt]="brand()?.altText ?? ''" [style.--sol-brand-logo-width]="logoWidth()" />
|
|
2143
|
+
</span>
|
|
2024
2144
|
} @else {
|
|
2025
2145
|
<span class="brand">{{ t('preview.brand') }}</span>
|
|
2026
2146
|
}
|
|
2027
2147
|
</div>
|
|
2028
|
-
<
|
|
2029
|
-
<
|
|
2030
|
-
<
|
|
2148
|
+
<a class="nav-item active">{{ t('preview.navDashboard') }}</a>
|
|
2149
|
+
<a class="nav-item">{{ t('preview.navRequests') }}</a>
|
|
2150
|
+
<a class="nav-item">{{ t('preview.navUsers') }}</a>
|
|
2031
2151
|
</aside>
|
|
2032
2152
|
|
|
2033
2153
|
<div class="preview-content">
|
|
@@ -2040,7 +2160,7 @@ class SolThemeStudioPreviewComponent {
|
|
|
2040
2160
|
</div>
|
|
2041
2161
|
<div class="stat-card">
|
|
2042
2162
|
<span class="stat-label">{{ t('preview.statBudget') }}</span>
|
|
2043
|
-
<span class="stat-value">
|
|
2163
|
+
<span class="stat-value">{{ t('preview.statBudgetValue') }}</span>
|
|
2044
2164
|
</div>
|
|
2045
2165
|
</div>
|
|
2046
2166
|
|
|
@@ -2049,16 +2169,24 @@ class SolThemeStudioPreviewComponent {
|
|
|
2049
2169
|
<input class="preview-input" type="text" [placeholder]="t('preview.inputPlaceholder')" />
|
|
2050
2170
|
</label>
|
|
2051
2171
|
|
|
2172
|
+
<div class="button-row">
|
|
2173
|
+
<button type="button" class="btn btn-primary">
|
|
2174
|
+
{{ t('preview.primaryAction') }}
|
|
2175
|
+
</button>
|
|
2176
|
+
<button type="button" class="btn btn-ghost">
|
|
2177
|
+
{{ t('preview.ghostAction') }}
|
|
2178
|
+
</button>
|
|
2179
|
+
</div>
|
|
2180
|
+
|
|
2052
2181
|
<div class="preview-field">
|
|
2053
2182
|
<span class="field-label">{{ t('preview.rolesHeading') }}</span>
|
|
2054
2183
|
<div class="button-row" data-testid="preview-role-buttons">
|
|
2055
2184
|
<button type="button" class="btn btn-primary">{{ t('preview.roleBtnPrimary') }}</button>
|
|
2056
2185
|
<button type="button" class="btn btn-secondary">{{ t('preview.roleBtnSecondary') }}</button>
|
|
2057
|
-
<button type="button" class="btn btn-
|
|
2058
|
-
<button type="button" class="btn btn-
|
|
2059
|
-
<button type="button" class="btn btn-
|
|
2060
|
-
<button type="button" class="btn btn-
|
|
2061
|
-
<button type="button" class="btn btn-state btn-info">{{ t('preview.roleBtnInfo') }}</button>
|
|
2186
|
+
<button type="button" class="btn btn-success">{{ t('preview.roleBtnSuccess') }}</button>
|
|
2187
|
+
<button type="button" class="btn btn-warning">{{ t('preview.roleBtnWarning') }}</button>
|
|
2188
|
+
<button type="button" class="btn btn-danger">{{ t('preview.roleBtnDanger') }}</button>
|
|
2189
|
+
<button type="button" class="btn btn-info">{{ t('preview.roleBtnInfo') }}</button>
|
|
2062
2190
|
</div>
|
|
2063
2191
|
</div>
|
|
2064
2192
|
|
|
@@ -2068,7 +2196,7 @@ class SolThemeStudioPreviewComponent {
|
|
|
2068
2196
|
<span class="chip chip-muted">{{ t('preview.chipPending') }}</span>
|
|
2069
2197
|
</div>
|
|
2070
2198
|
|
|
2071
|
-
<div class="preview-field">
|
|
2199
|
+
<div class="preview-field" data-testid="preview-body-text">
|
|
2072
2200
|
<h4 class="body-text-heading">{{ t('preview.bodyTextHeading') }}</h4>
|
|
2073
2201
|
<p class="body-text-paragraph">{{ t('preview.bodyTextParagraph') }}</p>
|
|
2074
2202
|
</div>
|
|
@@ -2085,39 +2213,49 @@ class SolThemeStudioPreviewComponent {
|
|
|
2085
2213
|
</thead>
|
|
2086
2214
|
<tbody>
|
|
2087
2215
|
@for (row of sampleRows; track row.name) {
|
|
2088
|
-
<tr>
|
|
2089
|
-
<td>{{ row.name }}</td>
|
|
2090
|
-
<td>{{ t('preview.tableColRole') }}</td>
|
|
2091
|
-
<td>{{ t(row.stateKey) }}</td>
|
|
2092
|
-
</tr>
|
|
2216
|
+
<tr><td>{{ row.name }}</td><td>{{ t('preview.tableColRole') }}</td><td>{{ t(row.stateKey) }}</td></tr>
|
|
2093
2217
|
}
|
|
2094
2218
|
</tbody>
|
|
2095
2219
|
</table>
|
|
2096
2220
|
</div>
|
|
2221
|
+
|
|
2222
|
+
@if (loader()) {
|
|
2223
|
+
<div class="preview-field" data-testid="preview-loader">
|
|
2224
|
+
<span class="field-label">{{ t('preview.loaderSample') }}</span>
|
|
2225
|
+
<span class="preview-spinner" aria-hidden="true"></span>
|
|
2226
|
+
</div>
|
|
2227
|
+
}
|
|
2097
2228
|
</div>
|
|
2098
2229
|
|
|
2099
|
-
<footer class="preview-footer"
|
|
2230
|
+
<footer class="preview-footer" data-testid="preview-footer">
|
|
2231
|
+
{{ tagline() || t('preview.footerFallback') }}
|
|
2232
|
+
</footer>
|
|
2100
2233
|
</div>
|
|
2101
|
-
`, isInline: true, styles: [":host{
|
|
2234
|
+
`, isInline: true, styles: [":host{display:block;position:relative;isolation:isolate;border-radius:14px;overflow:hidden;padding:10px;background-color:var(--sol-bg-page, #F8FAFC);color:var(--sol-color-text-primary, #0F172A);transition:background-color .45s ease}:host:before{content:\"\";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:var(--sol-bg-page-texture, none);background-repeat:no-repeat;background-size:cover;background-position:center}.preview-page{display:grid;position:relative;isolation:isolate;grid-template-columns:132px 1fr;min-height:380px;border-radius:10px;overflow:hidden;background-color:var(--sol-bg-page, #F8FAFC);font-family:var(--sol-font-family, system-ui, sans-serif);font-size:var(--sol-font-size-base, 14px);line-height:var(--sol-line-height, 1.5);color:var(--sol-color-text-primary, #0F172A);box-shadow:var(--sol-card-shadow, none);transition:background-color .45s ease}.preview-page:before{content:\"\";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:var(--sol-bg-page-texture, none);background-repeat:no-repeat;background-size:cover;background-position:center}.preview-sidebar{display:flex;flex-direction:column;gap:4px;padding:12px 8px;background:var(--sol-sidebar-bg, var(--sol-bg-surface, #FFFFFF))}.brand-row{display:flex;align-items:center;padding:4px 10px 10px}.brand{font-family:var(--sol-font-display, var(--sol-font-family, system-ui, sans-serif));font-weight:var(--sol-display-weight, 700);letter-spacing:var(--sol-display-tracking, 0em);text-transform:var(--sol-display-transform, none);color:var(--sol-sidebar-active-text, var(--sol-color-primary, #2563EB));font-size:var(--sol-font-size-lg, 16px)}.preview-brand-logo{display:inline-flex;align-items:center;height:28px;color:var(--sol-color-text-primary, #0F172A)}.brand-logo-img{display:block;width:auto;height:100%;max-width:min(var(--sol-brand-logo-width, 120px),var(--sol-brand-logo-max-width, 9999px));object-fit:contain}.nav-item{padding:7px 10px;border-radius:var(--sol-sidebar-item-radius, 6px);color:var(--sol-sidebar-text, var(--sol-color-text-secondary, #475569));font-size:var(--sol-font-size-sm, 13px);cursor:default}.nav-item.active{background:var(--sol-sidebar-active-bg, transparent);color:var(--sol-sidebar-active-text, var(--sol-color-primary, #2563EB));box-shadow:var(--sol-sidebar-indicator, none)}.preview-content{display:flex;flex-direction:column;gap:14px;padding:16px;min-width:0}.preview-title{margin:0;font-family:var(--sol-font-display, var(--sol-font-family, system-ui, sans-serif));font-weight:var(--sol-display-weight, 700);letter-spacing:var(--sol-display-tracking, 0em);text-transform:var(--sol-display-transform, none);font-size:var(--sol-font-size-xl, 20px)}.stat-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.stat-card{display:flex;flex-direction:column;gap:4px;padding:12px;min-width:0;background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);box-shadow:var(--sol-card-shadow, none);-webkit-backdrop-filter:var(--sol-card-blur, none);backdrop-filter:var(--sol-card-blur, none);transition:box-shadow var(--sol-dur-base, .24s) var(--sol-ease, ease),transform var(--sol-dur-base, .24s) var(--sol-ease, ease)}.stat-card:hover{transform:translateY(var(--sol-hover-lift, 0px));box-shadow:var(--sol-card-shadow-hover, var(--sol-card-shadow, none))}.stat-label{font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-muted, #64748B)}.stat-value{font-family:var(--sol-font-numeric, var(--sol-font-family, system-ui, sans-serif));font-weight:var(--sol-display-weight, 700);font-size:22px}.preview-field{display:flex;flex-direction:column;gap:5px}.field-label{font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-secondary, #475569)}.preview-input{height:var(--sol-size-input-height, 36px);padding:0 10px;background:var(--sol-input-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-input-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-input-radius, 6px);box-shadow:var(--sol-input-shadow, none);color:var(--sol-color-text-primary, #0F172A);font:inherit;outline:none}.preview-input:focus{border:var(--sol-input-focus-border, 1px solid var(--sol-color-primary, #2563EB));box-shadow:var(--sol-input-focus-ring, none)}.button-row{display:flex;gap:10px;flex-wrap:wrap}.btn{height:var(--sol-size-button-height, 36px);padding:0 16px;border-radius:var(--sol-button-radius, 6px);box-shadow:var(--sol-button-shadow, none);font-weight:var(--sol-button-weight, 600);text-transform:var(--sol-button-transform, none);font-family:inherit;font-size:var(--sol-font-size-sm, 13px);cursor:pointer;transition:filter var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.btn:active{transform:scale(var(--sol-press-scale, .98))}.btn:hover{filter:brightness(1.08)}.btn-primary{background:var(--sol-color-primary, #2563EB);color:var(--sol-color-primary-contrast, #FFFFFF);border:none}.btn-ghost{background:transparent;color:var(--sol-color-primary, #2563EB);border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0)}.btn-secondary{background:var(--sol-color-secondary, #E2E8F0);color:var(--sol-color-secondary-contrast, #1E293B);border:none}.btn-success{background:var(--sol-color-success, #16A34A);color:var(--sol-theme-studio-on-color, #FFFFFF);border:none}.btn-warning{background:var(--sol-color-warning, #D97706);color:var(--sol-theme-studio-on-color, #FFFFFF);border:none}.btn-danger{background:var(--sol-color-danger, #DC2626);color:var(--sol-theme-studio-on-color, #FFFFFF);border:none}.btn-info{background:var(--sol-color-info, #0284C7);color:var(--sol-theme-studio-on-color, #FFFFFF);border:none}.chip-row{display:flex;gap:8px;flex-wrap:wrap}.chip{padding:3px 10px;border-radius:var(--sol-border-radius-full, 999px);font-size:var(--sol-font-size-sm, 13px)}.chip-primary{background:color-mix(in srgb,var(--sol-color-primary, #2563EB) 12%,transparent);color:var(--sol-color-primary, #2563EB)}.chip-accent{background:color-mix(in srgb,var(--sol-color-accent, #F59E0B) 14%,transparent);color:var(--sol-color-accent, #F59E0B)}.chip-muted{background:var(--sol-bg-sunken, #F1F5F9);color:var(--sol-color-text-muted, #64748B)}.body-text-heading{margin:0;font-family:var(--sol-font-display, var(--sol-font-family, system-ui, sans-serif));font-weight:var(--sol-display-weight, 700);letter-spacing:var(--sol-display-tracking, 0em);text-transform:var(--sol-display-transform, none);font-size:var(--sol-font-size-lg, 16px)}.body-text-paragraph{margin:0;max-width:34ch}.preview-footer{grid-column:1 / -1;padding:8px 16px;border-top:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-muted, #64748B);text-align:center}:host{--sol-table-header-bg: color-mix(in srgb, var(--sol-color-primary, #2563EB) 8%, var(--sol-bg-surface, #FFFFFF));--sol-table-header-strong-bg: color-mix(in srgb, var(--sol-color-primary, #2563EB) 16%, var(--sol-bg-surface, #FFFFFF));--sol-table-zebra: color-mix(in srgb, var(--sol-color-text-primary, #0F172A) 4%, transparent);--sol-table-band: color-mix(in srgb, var(--sol-color-primary, #2563EB) 7%, transparent);--sol-table-cell-border: var(--sol-border-color-default, #E2E8F0);--sol-loader-color: var(--sol-color-primary, #2563EB);--sol-loader-track: color-mix(in srgb, var(--sol-color-text-primary, #0F172A) 14%, transparent)}.preview-table{width:100%;border-collapse:collapse;font-size:var(--sol-font-size-sm, 13px);background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border-radius:var(--sol-card-radius, 12px);overflow:hidden}.preview-table th,.preview-table td{padding:var(--sol-space-sm, 8px) var(--sol-space-md, 12px);text-align:left;border-bottom:var(--sol-border-width-default, 1px) solid var(--sol-table-cell-border)}.preview-table thead th{background:var(--sol-table-header-bg);color:var(--sol-color-text-secondary, #475569);font-weight:600;text-transform:uppercase;letter-spacing:.05em}.preview-table tbody tr:nth-of-type(odd){background:var(--sol-table-zebra)}:host([data-sol-table=\"clean\"]) .preview-table tbody tr:nth-of-type(odd){background:transparent}:host([data-sol-table=\"banded\"]) .preview-table tbody tr:nth-of-type(3n){background:var(--sol-table-band)}:host([data-sol-table=\"bordered\"]) .preview-table th,:host([data-sol-table=\"bordered\"]) .preview-table td{border:var(--sol-border-width-default, 1px) solid var(--sol-table-cell-border)}:host([data-sol-table=\"emphasis-header\"]) .preview-table thead th{background:var(--sol-table-header-strong-bg);color:var(--sol-color-primary, #2563EB)}.preview-spinner{display:inline-block;width:40px;height:40px;border-radius:50%;border:3px solid var(--sol-loader-track);border-top-color:var(--sol-loader-color);background-image:var(--sol-loader-image, none);background-repeat:no-repeat;background-position:center;background-size:contain;animation:var(--sol-loader-animation-name, sol-loader-spin) .8s linear infinite}@keyframes sol-loader-spin{to{transform:rotate(360deg)}}@keyframes sol-loader-pulse{0%,to{transform:scale(.72);opacity:.55}50%{transform:scale(1);opacity:1}}@keyframes sol-loader-shake{0%,to{transform:translate(0)}20%{transform:translate(-4px)}60%{transform:translate(4px)}}@media(prefers-reduced-motion:reduce){.preview-spinner{animation:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2102
2235
|
}
|
|
2103
2236
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolThemeStudioPreviewComponent, decorators: [{
|
|
2104
2237
|
type: Component,
|
|
2105
2238
|
args: [{ selector: 'sol-theme-studio-preview', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2106
2239
|
'[attr.data-mode]': 'mode()',
|
|
2240
|
+
'[class.is-dark]': "mode() === 'dark'",
|
|
2107
2241
|
'[attr.data-variant]': 'tableVariant()',
|
|
2242
|
+
'[attr.data-sol-table]': 'tableVariant()',
|
|
2243
|
+
'[attr.data-sol-loader]': "loader()?.presentation ?? 'current'",
|
|
2108
2244
|
}, template: `
|
|
2109
2245
|
<div class="preview-page" data-testid="preview-page">
|
|
2110
|
-
<aside class="preview-sidebar">
|
|
2246
|
+
<aside class="preview-sidebar" data-testid="preview-sidebar">
|
|
2111
2247
|
<div class="brand-row" data-testid="preview-brand">
|
|
2112
2248
|
@if (logoUrl(); as url) {
|
|
2113
|
-
<
|
|
2249
|
+
<span class="preview-brand-logo">
|
|
2250
|
+
<img class="brand-logo-img" [src]="url" [alt]="brand()?.altText ?? ''" [style.--sol-brand-logo-width]="logoWidth()" />
|
|
2251
|
+
</span>
|
|
2114
2252
|
} @else {
|
|
2115
2253
|
<span class="brand">{{ t('preview.brand') }}</span>
|
|
2116
2254
|
}
|
|
2117
2255
|
</div>
|
|
2118
|
-
<
|
|
2119
|
-
<
|
|
2120
|
-
<
|
|
2256
|
+
<a class="nav-item active">{{ t('preview.navDashboard') }}</a>
|
|
2257
|
+
<a class="nav-item">{{ t('preview.navRequests') }}</a>
|
|
2258
|
+
<a class="nav-item">{{ t('preview.navUsers') }}</a>
|
|
2121
2259
|
</aside>
|
|
2122
2260
|
|
|
2123
2261
|
<div class="preview-content">
|
|
@@ -2130,7 +2268,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
2130
2268
|
</div>
|
|
2131
2269
|
<div class="stat-card">
|
|
2132
2270
|
<span class="stat-label">{{ t('preview.statBudget') }}</span>
|
|
2133
|
-
<span class="stat-value">
|
|
2271
|
+
<span class="stat-value">{{ t('preview.statBudgetValue') }}</span>
|
|
2134
2272
|
</div>
|
|
2135
2273
|
</div>
|
|
2136
2274
|
|
|
@@ -2139,16 +2277,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
2139
2277
|
<input class="preview-input" type="text" [placeholder]="t('preview.inputPlaceholder')" />
|
|
2140
2278
|
</label>
|
|
2141
2279
|
|
|
2280
|
+
<div class="button-row">
|
|
2281
|
+
<button type="button" class="btn btn-primary">
|
|
2282
|
+
{{ t('preview.primaryAction') }}
|
|
2283
|
+
</button>
|
|
2284
|
+
<button type="button" class="btn btn-ghost">
|
|
2285
|
+
{{ t('preview.ghostAction') }}
|
|
2286
|
+
</button>
|
|
2287
|
+
</div>
|
|
2288
|
+
|
|
2142
2289
|
<div class="preview-field">
|
|
2143
2290
|
<span class="field-label">{{ t('preview.rolesHeading') }}</span>
|
|
2144
2291
|
<div class="button-row" data-testid="preview-role-buttons">
|
|
2145
2292
|
<button type="button" class="btn btn-primary">{{ t('preview.roleBtnPrimary') }}</button>
|
|
2146
2293
|
<button type="button" class="btn btn-secondary">{{ t('preview.roleBtnSecondary') }}</button>
|
|
2147
|
-
<button type="button" class="btn btn-
|
|
2148
|
-
<button type="button" class="btn btn-
|
|
2149
|
-
<button type="button" class="btn btn-
|
|
2150
|
-
<button type="button" class="btn btn-
|
|
2151
|
-
<button type="button" class="btn btn-state btn-info">{{ t('preview.roleBtnInfo') }}</button>
|
|
2294
|
+
<button type="button" class="btn btn-success">{{ t('preview.roleBtnSuccess') }}</button>
|
|
2295
|
+
<button type="button" class="btn btn-warning">{{ t('preview.roleBtnWarning') }}</button>
|
|
2296
|
+
<button type="button" class="btn btn-danger">{{ t('preview.roleBtnDanger') }}</button>
|
|
2297
|
+
<button type="button" class="btn btn-info">{{ t('preview.roleBtnInfo') }}</button>
|
|
2152
2298
|
</div>
|
|
2153
2299
|
</div>
|
|
2154
2300
|
|
|
@@ -2158,7 +2304,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
2158
2304
|
<span class="chip chip-muted">{{ t('preview.chipPending') }}</span>
|
|
2159
2305
|
</div>
|
|
2160
2306
|
|
|
2161
|
-
<div class="preview-field">
|
|
2307
|
+
<div class="preview-field" data-testid="preview-body-text">
|
|
2162
2308
|
<h4 class="body-text-heading">{{ t('preview.bodyTextHeading') }}</h4>
|
|
2163
2309
|
<p class="body-text-paragraph">{{ t('preview.bodyTextParagraph') }}</p>
|
|
2164
2310
|
</div>
|
|
@@ -2175,21 +2321,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
2175
2321
|
</thead>
|
|
2176
2322
|
<tbody>
|
|
2177
2323
|
@for (row of sampleRows; track row.name) {
|
|
2178
|
-
<tr>
|
|
2179
|
-
<td>{{ row.name }}</td>
|
|
2180
|
-
<td>{{ t('preview.tableColRole') }}</td>
|
|
2181
|
-
<td>{{ t(row.stateKey) }}</td>
|
|
2182
|
-
</tr>
|
|
2324
|
+
<tr><td>{{ row.name }}</td><td>{{ t('preview.tableColRole') }}</td><td>{{ t(row.stateKey) }}</td></tr>
|
|
2183
2325
|
}
|
|
2184
2326
|
</tbody>
|
|
2185
2327
|
</table>
|
|
2186
2328
|
</div>
|
|
2329
|
+
|
|
2330
|
+
@if (loader()) {
|
|
2331
|
+
<div class="preview-field" data-testid="preview-loader">
|
|
2332
|
+
<span class="field-label">{{ t('preview.loaderSample') }}</span>
|
|
2333
|
+
<span class="preview-spinner" aria-hidden="true"></span>
|
|
2334
|
+
</div>
|
|
2335
|
+
}
|
|
2187
2336
|
</div>
|
|
2188
2337
|
|
|
2189
|
-
<footer class="preview-footer"
|
|
2338
|
+
<footer class="preview-footer" data-testid="preview-footer">
|
|
2339
|
+
{{ tagline() || t('preview.footerFallback') }}
|
|
2340
|
+
</footer>
|
|
2190
2341
|
</div>
|
|
2191
|
-
`, styles: [":host{
|
|
2192
|
-
}], ctorParameters: () => [], propDecorators: { theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: true }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], brand: [{ type: i0.Input, args: [{ isSignal: true, alias: "brand", required: false }] }], tagline: [{ type: i0.Input, args: [{ isSignal: true, alias: "tagline", required: false }] }], tableVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableVariant", required: false }] }] } });
|
|
2342
|
+
`, styles: [":host{display:block;position:relative;isolation:isolate;border-radius:14px;overflow:hidden;padding:10px;background-color:var(--sol-bg-page, #F8FAFC);color:var(--sol-color-text-primary, #0F172A);transition:background-color .45s ease}:host:before{content:\"\";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:var(--sol-bg-page-texture, none);background-repeat:no-repeat;background-size:cover;background-position:center}.preview-page{display:grid;position:relative;isolation:isolate;grid-template-columns:132px 1fr;min-height:380px;border-radius:10px;overflow:hidden;background-color:var(--sol-bg-page, #F8FAFC);font-family:var(--sol-font-family, system-ui, sans-serif);font-size:var(--sol-font-size-base, 14px);line-height:var(--sol-line-height, 1.5);color:var(--sol-color-text-primary, #0F172A);box-shadow:var(--sol-card-shadow, none);transition:background-color .45s ease}.preview-page:before{content:\"\";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:var(--sol-bg-page-texture, none);background-repeat:no-repeat;background-size:cover;background-position:center}.preview-sidebar{display:flex;flex-direction:column;gap:4px;padding:12px 8px;background:var(--sol-sidebar-bg, var(--sol-bg-surface, #FFFFFF))}.brand-row{display:flex;align-items:center;padding:4px 10px 10px}.brand{font-family:var(--sol-font-display, var(--sol-font-family, system-ui, sans-serif));font-weight:var(--sol-display-weight, 700);letter-spacing:var(--sol-display-tracking, 0em);text-transform:var(--sol-display-transform, none);color:var(--sol-sidebar-active-text, var(--sol-color-primary, #2563EB));font-size:var(--sol-font-size-lg, 16px)}.preview-brand-logo{display:inline-flex;align-items:center;height:28px;color:var(--sol-color-text-primary, #0F172A)}.brand-logo-img{display:block;width:auto;height:100%;max-width:min(var(--sol-brand-logo-width, 120px),var(--sol-brand-logo-max-width, 9999px));object-fit:contain}.nav-item{padding:7px 10px;border-radius:var(--sol-sidebar-item-radius, 6px);color:var(--sol-sidebar-text, var(--sol-color-text-secondary, #475569));font-size:var(--sol-font-size-sm, 13px);cursor:default}.nav-item.active{background:var(--sol-sidebar-active-bg, transparent);color:var(--sol-sidebar-active-text, var(--sol-color-primary, #2563EB));box-shadow:var(--sol-sidebar-indicator, none)}.preview-content{display:flex;flex-direction:column;gap:14px;padding:16px;min-width:0}.preview-title{margin:0;font-family:var(--sol-font-display, var(--sol-font-family, system-ui, sans-serif));font-weight:var(--sol-display-weight, 700);letter-spacing:var(--sol-display-tracking, 0em);text-transform:var(--sol-display-transform, none);font-size:var(--sol-font-size-xl, 20px)}.stat-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.stat-card{display:flex;flex-direction:column;gap:4px;padding:12px;min-width:0;background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);box-shadow:var(--sol-card-shadow, none);-webkit-backdrop-filter:var(--sol-card-blur, none);backdrop-filter:var(--sol-card-blur, none);transition:box-shadow var(--sol-dur-base, .24s) var(--sol-ease, ease),transform var(--sol-dur-base, .24s) var(--sol-ease, ease)}.stat-card:hover{transform:translateY(var(--sol-hover-lift, 0px));box-shadow:var(--sol-card-shadow-hover, var(--sol-card-shadow, none))}.stat-label{font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-muted, #64748B)}.stat-value{font-family:var(--sol-font-numeric, var(--sol-font-family, system-ui, sans-serif));font-weight:var(--sol-display-weight, 700);font-size:22px}.preview-field{display:flex;flex-direction:column;gap:5px}.field-label{font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-secondary, #475569)}.preview-input{height:var(--sol-size-input-height, 36px);padding:0 10px;background:var(--sol-input-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-input-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-input-radius, 6px);box-shadow:var(--sol-input-shadow, none);color:var(--sol-color-text-primary, #0F172A);font:inherit;outline:none}.preview-input:focus{border:var(--sol-input-focus-border, 1px solid var(--sol-color-primary, #2563EB));box-shadow:var(--sol-input-focus-ring, none)}.button-row{display:flex;gap:10px;flex-wrap:wrap}.btn{height:var(--sol-size-button-height, 36px);padding:0 16px;border-radius:var(--sol-button-radius, 6px);box-shadow:var(--sol-button-shadow, none);font-weight:var(--sol-button-weight, 600);text-transform:var(--sol-button-transform, none);font-family:inherit;font-size:var(--sol-font-size-sm, 13px);cursor:pointer;transition:filter var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.btn:active{transform:scale(var(--sol-press-scale, .98))}.btn:hover{filter:brightness(1.08)}.btn-primary{background:var(--sol-color-primary, #2563EB);color:var(--sol-color-primary-contrast, #FFFFFF);border:none}.btn-ghost{background:transparent;color:var(--sol-color-primary, #2563EB);border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0)}.btn-secondary{background:var(--sol-color-secondary, #E2E8F0);color:var(--sol-color-secondary-contrast, #1E293B);border:none}.btn-success{background:var(--sol-color-success, #16A34A);color:var(--sol-theme-studio-on-color, #FFFFFF);border:none}.btn-warning{background:var(--sol-color-warning, #D97706);color:var(--sol-theme-studio-on-color, #FFFFFF);border:none}.btn-danger{background:var(--sol-color-danger, #DC2626);color:var(--sol-theme-studio-on-color, #FFFFFF);border:none}.btn-info{background:var(--sol-color-info, #0284C7);color:var(--sol-theme-studio-on-color, #FFFFFF);border:none}.chip-row{display:flex;gap:8px;flex-wrap:wrap}.chip{padding:3px 10px;border-radius:var(--sol-border-radius-full, 999px);font-size:var(--sol-font-size-sm, 13px)}.chip-primary{background:color-mix(in srgb,var(--sol-color-primary, #2563EB) 12%,transparent);color:var(--sol-color-primary, #2563EB)}.chip-accent{background:color-mix(in srgb,var(--sol-color-accent, #F59E0B) 14%,transparent);color:var(--sol-color-accent, #F59E0B)}.chip-muted{background:var(--sol-bg-sunken, #F1F5F9);color:var(--sol-color-text-muted, #64748B)}.body-text-heading{margin:0;font-family:var(--sol-font-display, var(--sol-font-family, system-ui, sans-serif));font-weight:var(--sol-display-weight, 700);letter-spacing:var(--sol-display-tracking, 0em);text-transform:var(--sol-display-transform, none);font-size:var(--sol-font-size-lg, 16px)}.body-text-paragraph{margin:0;max-width:34ch}.preview-footer{grid-column:1 / -1;padding:8px 16px;border-top:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-muted, #64748B);text-align:center}:host{--sol-table-header-bg: color-mix(in srgb, var(--sol-color-primary, #2563EB) 8%, var(--sol-bg-surface, #FFFFFF));--sol-table-header-strong-bg: color-mix(in srgb, var(--sol-color-primary, #2563EB) 16%, var(--sol-bg-surface, #FFFFFF));--sol-table-zebra: color-mix(in srgb, var(--sol-color-text-primary, #0F172A) 4%, transparent);--sol-table-band: color-mix(in srgb, var(--sol-color-primary, #2563EB) 7%, transparent);--sol-table-cell-border: var(--sol-border-color-default, #E2E8F0);--sol-loader-color: var(--sol-color-primary, #2563EB);--sol-loader-track: color-mix(in srgb, var(--sol-color-text-primary, #0F172A) 14%, transparent)}.preview-table{width:100%;border-collapse:collapse;font-size:var(--sol-font-size-sm, 13px);background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border-radius:var(--sol-card-radius, 12px);overflow:hidden}.preview-table th,.preview-table td{padding:var(--sol-space-sm, 8px) var(--sol-space-md, 12px);text-align:left;border-bottom:var(--sol-border-width-default, 1px) solid var(--sol-table-cell-border)}.preview-table thead th{background:var(--sol-table-header-bg);color:var(--sol-color-text-secondary, #475569);font-weight:600;text-transform:uppercase;letter-spacing:.05em}.preview-table tbody tr:nth-of-type(odd){background:var(--sol-table-zebra)}:host([data-sol-table=\"clean\"]) .preview-table tbody tr:nth-of-type(odd){background:transparent}:host([data-sol-table=\"banded\"]) .preview-table tbody tr:nth-of-type(3n){background:var(--sol-table-band)}:host([data-sol-table=\"bordered\"]) .preview-table th,:host([data-sol-table=\"bordered\"]) .preview-table td{border:var(--sol-border-width-default, 1px) solid var(--sol-table-cell-border)}:host([data-sol-table=\"emphasis-header\"]) .preview-table thead th{background:var(--sol-table-header-strong-bg);color:var(--sol-color-primary, #2563EB)}.preview-spinner{display:inline-block;width:40px;height:40px;border-radius:50%;border:3px solid var(--sol-loader-track);border-top-color:var(--sol-loader-color);background-image:var(--sol-loader-image, none);background-repeat:no-repeat;background-position:center;background-size:contain;animation:var(--sol-loader-animation-name, sol-loader-spin) .8s linear infinite}@keyframes sol-loader-spin{to{transform:rotate(360deg)}}@keyframes sol-loader-pulse{0%,to{transform:scale(.72);opacity:.55}50%{transform:scale(1);opacity:1}}@keyframes sol-loader-shake{0%,to{transform:translate(0)}20%{transform:translate(-4px)}60%{transform:translate(4px)}}@media(prefers-reduced-motion:reduce){.preview-spinner{animation:none}}\n"] }]
|
|
2343
|
+
}], ctorParameters: () => [], propDecorators: { theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: true }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], brand: [{ type: i0.Input, args: [{ isSignal: true, alias: "brand", required: false }] }], tagline: [{ type: i0.Input, args: [{ isSignal: true, alias: "tagline", required: false }] }], tableVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableVariant", required: false }] }], loader: [{ type: i0.Input, args: [{ isSignal: true, alias: "loader", required: false }] }] } });
|
|
2193
2344
|
|
|
2194
2345
|
const TEXTURE_COLOR_TEXTURES = new Set([
|
|
2195
2346
|
'glow',
|
|
@@ -2215,8 +2366,6 @@ const BRAND_WIDTH_MAX = 200;
|
|
|
2215
2366
|
const MAX_IMAGE_FILE_BYTES = 2 * 1024 * 1024;
|
|
2216
2367
|
const LOGO_ACCEPT = 'image/png,image/jpeg,image/svg+xml,image/webp';
|
|
2217
2368
|
const FAVICON_ACCEPT = 'image/png,image/svg+xml,image/x-icon,image/vnd.microsoft.icon,image/webp';
|
|
2218
|
-
/** Ancho desde el que la vista previa vive al lado de los controles (y no en un panel lateral). */
|
|
2219
|
-
const DESKTOP_MIN_WIDTH = 1024;
|
|
2220
2369
|
const SPLIT_DEFAULT = 60;
|
|
2221
2370
|
const SPLIT_MIN = 30;
|
|
2222
2371
|
const SPLIT_MAX = 75;
|
|
@@ -2236,19 +2385,30 @@ function readStoredSplit() {
|
|
|
2236
2385
|
return SPLIT_DEFAULT;
|
|
2237
2386
|
}
|
|
2238
2387
|
}
|
|
2388
|
+
/** `true` cuando el resultado de `store.apply` es el tema persistido (y no una versión). */
|
|
2389
|
+
function isThemeFileLike(value) {
|
|
2390
|
+
return (!!value &&
|
|
2391
|
+
typeof value === 'object' &&
|
|
2392
|
+
'modes' in value &&
|
|
2393
|
+
'meta' in value &&
|
|
2394
|
+
'primitives' in value);
|
|
2395
|
+
}
|
|
2239
2396
|
const opt = (value, labelKey) => ({ value, labelKey });
|
|
2240
2397
|
/**
|
|
2241
|
-
* `<sol-theme-studio>`: editor visual completo del tema del tenant
|
|
2398
|
+
* `<sol-theme-studio>`: editor visual completo del tema del tenant (portado del Theme Studio de
|
|
2399
|
+
* PANDORA con el mismo marcado, estilos, textos y comportamiento).
|
|
2242
2400
|
*
|
|
2243
2401
|
* - Persistencia por el puerto `THEME_STUDIO_STORE` (la app implementa el adaptador). Los
|
|
2244
2402
|
* métodos opcionales del store apagan su sección: sin historial o sin carga de imágenes.
|
|
2245
|
-
* - Edición: controles COMPARTIDOS (marca,
|
|
2246
|
-
* POR MODO (color, roles, sombra, textura, barra
|
|
2247
|
-
*
|
|
2248
|
-
* -
|
|
2249
|
-
*
|
|
2250
|
-
* -
|
|
2251
|
-
*
|
|
2403
|
+
* - Edición: controles COMPARTIDOS (marca, pie, inicio de sesión, modo por defecto, tablas,
|
|
2404
|
+
* tipografía, forma, densidad, movimiento) y POR MODO (color, roles, sombra, textura, barra
|
|
2405
|
+
* lateral, encabezado) en pestañas claro/oscuro. Secciones opcionales por `features`.
|
|
2406
|
+
* - Vista previa aislada al lado de los controles en escritorio (divisor arrastrable, 60/40 por
|
|
2407
|
+
* defecto) y en un panel lateral con botón flotante bajo 1024 px.
|
|
2408
|
+
* - Aplicar (con confirmación) llama a `store.apply(...)`; con el tema persistido lo empuja con
|
|
2409
|
+
* `ThemeService.setTenantTheme`, sin él llama a `ThemeService.refresh()`. Emite `applied`.
|
|
2410
|
+
* - Historial paginado, previsualización y restauración de versiones (`sourceVersionId`).
|
|
2411
|
+
* - Importar/exportar JSON con validación previa. Textos por `SOL_I18N` (`sol.themeStudio.*`).
|
|
2252
2412
|
*/
|
|
2253
2413
|
class SolThemeStudioComponent {
|
|
2254
2414
|
store = inject(THEME_STUDIO_STORE, { optional: true });
|
|
@@ -2263,14 +2423,42 @@ class SolThemeStudioComponent {
|
|
|
2263
2423
|
/** Campos opacos del host que viajan intactos a `meta` (y se aceptan al importar JSON). */
|
|
2264
2424
|
metaExtras = input(undefined, /* @ts-ignore */
|
|
2265
2425
|
...(ngDevMode ? [{ debugName: "metaExtras" }] : /* istanbul ignore next */ []));
|
|
2426
|
+
/**
|
|
2427
|
+
* Forma de campos opacos de `meta` que el host PRESERVA sin escribirlos (p. ej. el
|
|
2428
|
+
* comportamiento del menú lateral): solo amplía lo que el importador de JSON acepta.
|
|
2429
|
+
*/
|
|
2430
|
+
metaExtrasSchema = input(undefined, /* @ts-ignore */
|
|
2431
|
+
...(ngDevMode ? [{ debugName: "metaExtrasSchema" }] : /* istanbul ignore next */ []));
|
|
2432
|
+
/** Secciones y comportamientos opcionales (ver `SolThemeStudioFeatures`). */
|
|
2433
|
+
features = input({}, /* @ts-ignore */
|
|
2434
|
+
...(ngDevMode ? [{ debugName: "features" }] : /* istanbul ignore next */ []));
|
|
2435
|
+
/** Placeholder del texto del pie de página (p. ej. el formato por defecto del pie del host). */
|
|
2436
|
+
footerPlaceholder = input(undefined, /* @ts-ignore */
|
|
2437
|
+
...(ngDevMode ? [{ debugName: "footerPlaceholder" }] : /* istanbul ignore next */ []));
|
|
2438
|
+
/** Nombre del archivo de «Exportar JSON». Por defecto, `<tenant>-theme.json`. */
|
|
2439
|
+
exportFileName = input(undefined, /* @ts-ignore */
|
|
2440
|
+
...(ngDevMode ? [{ debugName: "exportFileName" }] : /* istanbul ignore next */ []));
|
|
2441
|
+
/** Zona horaria IANA de las fechas del historial (p. ej. `America/Bogota`). Por defecto, la del navegador. */
|
|
2442
|
+
versionTimeZone = input(undefined, /* @ts-ignore */
|
|
2443
|
+
...(ngDevMode ? [{ debugName: "versionTimeZone" }] : /* istanbul ignore next */ []));
|
|
2444
|
+
/** Texto que sigue a cada fecha del historial (p. ej. `(Bogotá)`). */
|
|
2445
|
+
versionTimeZoneLabel = input(undefined, /* @ts-ignore */
|
|
2446
|
+
...(ngDevMode ? [{ debugName: "versionTimeZoneLabel" }] : /* istanbul ignore next */ []));
|
|
2266
2447
|
/** Tema persistido con éxito por `store.apply(...)`. */
|
|
2267
2448
|
applied = output();
|
|
2268
2449
|
/** Avisos para que la aplicación los muestre a su manera. */
|
|
2269
2450
|
notify = output();
|
|
2270
|
-
/** El store permite subir imágenes (logo
|
|
2451
|
+
/** El store permite subir imágenes (logo, favicon, imagen del indicador de carga). */
|
|
2271
2452
|
canUpload = typeof this.store?.uploadLogo === 'function';
|
|
2272
2453
|
/** El store expone historial completo (listar + leer una versión). */
|
|
2273
2454
|
canBrowseHistory = typeof this.store?.listVersions === 'function' && typeof this.store?.getVersion === 'function';
|
|
2455
|
+
feature = computed(() => ({
|
|
2456
|
+
themeName: true,
|
|
2457
|
+
loader: false,
|
|
2458
|
+
persistDefaultModeOnApply: false,
|
|
2459
|
+
...this.features(),
|
|
2460
|
+
}), /* @ts-ignore */
|
|
2461
|
+
...(ngDevMode ? [{ debugName: "feature" }] : /* istanbul ignore next */ []));
|
|
2274
2462
|
loadState = signal(this.store ? 'loading' : 'no-store', /* @ts-ignore */
|
|
2275
2463
|
...(ngDevMode ? [{ debugName: "loadState" }] : /* istanbul ignore next */ []));
|
|
2276
2464
|
savedTheme = signal(null, /* @ts-ignore */
|
|
@@ -2279,6 +2467,7 @@ class SolThemeStudioComponent {
|
|
|
2279
2467
|
...(ngDevMode ? [{ debugName: "hasSavedTheme" }] : /* istanbul ignore next */ []));
|
|
2280
2468
|
form = signal(cloneStudioForm(DEFAULT_STUDIO_FORM), /* @ts-ignore */
|
|
2281
2469
|
...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
|
|
2470
|
+
/** Modo activo: define QUÉ bloque por modo se edita Y el modo de la vista previa. */
|
|
2282
2471
|
activeMode = signal(this.themeService.isDark() ? 'dark' : 'light', /* @ts-ignore */
|
|
2283
2472
|
...(ngDevMode ? [{ debugName: "activeMode" }] : /* istanbul ignore next */ []));
|
|
2284
2473
|
modeForm = computed(() => this.form()[this.activeMode()], /* @ts-ignore */
|
|
@@ -2291,11 +2480,17 @@ class SolThemeStudioComponent {
|
|
|
2291
2480
|
...(ngDevMode ? [{ debugName: "tagline" }] : /* istanbul ignore next */ []));
|
|
2292
2481
|
favicon = signal('', /* @ts-ignore */
|
|
2293
2482
|
...(ngDevMode ? [{ debugName: "favicon" }] : /* istanbul ignore next */ []));
|
|
2294
|
-
|
|
2295
|
-
...(ngDevMode ? [{ debugName: "
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
...(ngDevMode ? [{ debugName: "
|
|
2483
|
+
loaderForm = signal({ ...DEFAULT_LOADER_CONFIG }, /* @ts-ignore */
|
|
2484
|
+
...(ngDevMode ? [{ debugName: "loaderForm" }] : /* istanbul ignore next */ []));
|
|
2485
|
+
/** Logo que se está subiendo (deshabilita ambos botones de logo mientras dura). */
|
|
2486
|
+
uploadingLogo = signal(null, /* @ts-ignore */
|
|
2487
|
+
...(ngDevMode ? [{ debugName: "uploadingLogo" }] : /* istanbul ignore next */ []));
|
|
2488
|
+
uploadingFavicon = signal(false, /* @ts-ignore */
|
|
2489
|
+
...(ngDevMode ? [{ debugName: "uploadingFavicon" }] : /* istanbul ignore next */ []));
|
|
2490
|
+
uploadingLoaderImage = signal(false, /* @ts-ignore */
|
|
2491
|
+
...(ngDevMode ? [{ debugName: "uploadingLoaderImage" }] : /* istanbul ignore next */ []));
|
|
2492
|
+
logoAccept = LOGO_ACCEPT;
|
|
2493
|
+
faviconAccept = FAVICON_ACCEPT;
|
|
2299
2494
|
historyOpen = signal(false, /* @ts-ignore */
|
|
2300
2495
|
...(ngDevMode ? [{ debugName: "historyOpen" }] : /* istanbul ignore next */ []));
|
|
2301
2496
|
historyLoading = signal(false, /* @ts-ignore */
|
|
@@ -2316,8 +2511,9 @@ class SolThemeStudioComponent {
|
|
|
2316
2511
|
...(ngDevMode ? [{ debugName: "applying" }] : /* istanbul ignore next */ []));
|
|
2317
2512
|
showApplyConfirm = signal(false, /* @ts-ignore */
|
|
2318
2513
|
...(ngDevMode ? [{ debugName: "showApplyConfirm" }] : /* istanbul ignore next */ []));
|
|
2319
|
-
|
|
2320
|
-
|
|
2514
|
+
/** Bajo 1024px la vista previa vive en el panel lateral que abre el botón flotante. */
|
|
2515
|
+
previewOpenMobile = signal(false, /* @ts-ignore */
|
|
2516
|
+
...(ngDevMode ? [{ debugName: "previewOpenMobile" }] : /* istanbul ignore next */ []));
|
|
2321
2517
|
status = signal(null, /* @ts-ignore */
|
|
2322
2518
|
...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
2323
2519
|
busy = computed(() => this.applying() || this.versionLoading() || this.importing(), /* @ts-ignore */
|
|
@@ -2327,10 +2523,6 @@ class SolThemeStudioComponent {
|
|
|
2327
2523
|
importedGenerated = null;
|
|
2328
2524
|
gridContainer = viewChild('gridContainer', /* @ts-ignore */
|
|
2329
2525
|
...(ngDevMode ? [{ debugName: "gridContainer" }] : /* istanbul ignore next */ []));
|
|
2330
|
-
themeJsonInput = viewChild('themeJsonInput', /* @ts-ignore */
|
|
2331
|
-
...(ngDevMode ? [{ debugName: "themeJsonInput" }] : /* istanbul ignore next */ []));
|
|
2332
|
-
imageFileInput = viewChild('imageFileInput', /* @ts-ignore */
|
|
2333
|
-
...(ngDevMode ? [{ debugName: "imageFileInput" }] : /* istanbul ignore next */ []));
|
|
2334
2526
|
studioSplit = signal(readStoredSplit(), /* @ts-ignore */
|
|
2335
2527
|
...(ngDevMode ? [{ debugName: "studioSplit" }] : /* istanbul ignore next */ []));
|
|
2336
2528
|
resizing = signal(false, /* @ts-ignore */
|
|
@@ -2340,9 +2532,18 @@ class SolThemeStudioComponent {
|
|
|
2340
2532
|
/** Base del builder: importado/versión en borrador → tema guardado → base del host → empaquetado. */
|
|
2341
2533
|
workingBase = computed(() => this.importedTheme() ?? this.savedTheme() ?? this.baseTheme() ?? this.bundledDefault, /* @ts-ignore */
|
|
2342
2534
|
...(ngDevMode ? [{ debugName: "workingBase" }] : /* istanbul ignore next */ []));
|
|
2343
|
-
/**
|
|
2535
|
+
/** Indicador de carga para la vista previa (solo con la sección activa). */
|
|
2536
|
+
previewLoader = computed(() => this.feature().loader ? this.loaderForm() : undefined, /* @ts-ignore */
|
|
2537
|
+
...(ngDevMode ? [{ debugName: "previewLoader" }] : /* istanbul ignore next */ []));
|
|
2538
|
+
/**
|
|
2539
|
+
* TEMA EN EDICIÓN: el formulario construido sobre la base, con la marca, el nombre, el pie, el
|
|
2540
|
+
* favicon y las secciones opcionales (indicador de carga, variante de tabla en `meta`)
|
|
2541
|
+
* compuestos en `meta`. Un tema importado o una versión en borrador conserva sus tokens no
|
|
2542
|
+
* editados (`mergeThemeEditorChanges`).
|
|
2543
|
+
*/
|
|
2344
2544
|
effectiveTheme = computed(() => {
|
|
2345
2545
|
const built = buildThemeFile(this.form(), this.workingBase(), this.metaExtras());
|
|
2546
|
+
const feature = this.feature();
|
|
2346
2547
|
const meta = {
|
|
2347
2548
|
...built.meta,
|
|
2348
2549
|
logo: { ...this.brandForm() },
|
|
@@ -2350,6 +2551,10 @@ class SolThemeStudioComponent {
|
|
|
2350
2551
|
tagline: this.tagline().trim() || undefined,
|
|
2351
2552
|
favicon: this.favicon().trim() || undefined,
|
|
2352
2553
|
};
|
|
2554
|
+
if (feature.loader)
|
|
2555
|
+
meta['loader'] = { ...this.loaderForm() };
|
|
2556
|
+
if (feature.tableVariantMetaKey)
|
|
2557
|
+
meta[feature.tableVariantMetaKey] = this.form().tableVariant;
|
|
2353
2558
|
const generated = { ...built, meta };
|
|
2354
2559
|
const imported = this.importedTheme();
|
|
2355
2560
|
return imported && this.importedGenerated
|
|
@@ -2371,74 +2576,122 @@ class SolThemeStudioComponent {
|
|
|
2371
2576
|
brandWidthMax = BRAND_WIDTH_MAX;
|
|
2372
2577
|
shadowColorSuggestions = STUDIO_SHADOW_COLOR_SUGGESTIONS;
|
|
2373
2578
|
textureColorSuggestions = STUDIO_TEXTURE_COLOR_SUGGESTIONS;
|
|
2374
|
-
logoSlots = [
|
|
2375
|
-
{ target: 'logo', labelKey: 'brand.logo', altKey: 'brand.logoAlt' },
|
|
2376
|
-
{ target: 'logoDark', labelKey: 'brand.logoDark', altKey: 'brand.logoDarkAlt' },
|
|
2377
|
-
{ target: 'favicon', labelKey: 'brand.favicon', altKey: 'brand.faviconAlt' },
|
|
2378
|
-
];
|
|
2379
2579
|
fontRoles = [
|
|
2380
|
-
{ key: 'displayFont', labelKey: 'typography.display', quick: STUDIO_DISPLAY_FONTS_QUICK, catalog: STUDIO_DISPLAY_FONTS },
|
|
2381
|
-
{ key: 'bodyFont', labelKey: 'typography.body', quick: STUDIO_BODY_FONTS_QUICK, catalog: STUDIO_BODY_FONTS },
|
|
2382
|
-
];
|
|
2383
|
-
layoutGroups = [
|
|
2384
2580
|
{
|
|
2385
|
-
key: '
|
|
2386
|
-
labelKey: '
|
|
2387
|
-
|
|
2581
|
+
key: 'displayFont',
|
|
2582
|
+
labelKey: 'typography.display',
|
|
2583
|
+
testId: 'select-display-font',
|
|
2584
|
+
quick: STUDIO_DISPLAY_FONTS_QUICK,
|
|
2585
|
+
catalog: STUDIO_DISPLAY_FONTS,
|
|
2388
2586
|
},
|
|
2389
|
-
{ key: 'defaultMode', labelKey: 'defaultMode.title', options: [opt('light', 'defaultMode.light'), opt('dark', 'defaultMode.dark')] },
|
|
2390
2587
|
{
|
|
2391
|
-
key: '
|
|
2392
|
-
labelKey: '
|
|
2393
|
-
|
|
2588
|
+
key: 'bodyFont',
|
|
2589
|
+
labelKey: 'typography.body',
|
|
2590
|
+
testId: 'select-body-font',
|
|
2591
|
+
quick: STUDIO_BODY_FONTS_QUICK,
|
|
2592
|
+
catalog: STUDIO_BODY_FONTS,
|
|
2394
2593
|
},
|
|
2395
2594
|
];
|
|
2595
|
+
authLayoutOptions = [
|
|
2596
|
+
opt('centered', 'auth.layoutCentered'),
|
|
2597
|
+
opt('split-left', 'auth.layoutSplitLeft'),
|
|
2598
|
+
opt('split-right', 'auth.layoutSplitRight'),
|
|
2599
|
+
];
|
|
2600
|
+
defaultModeOptions = [
|
|
2601
|
+
opt('light', 'defaultMode.light'),
|
|
2602
|
+
opt('dark', 'defaultMode.dark'),
|
|
2603
|
+
];
|
|
2604
|
+
tableVariantOptions = SOL_TABLE_VARIANTS.map((variant) => opt(variant, variant === 'emphasis-header' ? 'table.emphasisHeader' : `table.${variant}`));
|
|
2605
|
+
loaderPresentationOptions = STUDIO_LOADER_PRESENTATIONS.map(value => opt(value, `loader.presentation${value[0].toUpperCase()}${value.slice(1)}`));
|
|
2606
|
+
loaderAnimationOptions = STUDIO_LOADER_ANIMATIONS.map(value => opt(value, `loader.animation${value[0].toUpperCase()}${value.slice(1)}`));
|
|
2396
2607
|
typographyGroups = [
|
|
2397
2608
|
{
|
|
2398
2609
|
key: 'displayWeight',
|
|
2399
2610
|
labelKey: 'typography.weight',
|
|
2400
|
-
options: [
|
|
2611
|
+
options: [
|
|
2612
|
+
opt('auto', 'typography.weightAuto'),
|
|
2613
|
+
opt(600, 'typography.weight600'),
|
|
2614
|
+
opt(700, 'typography.weight700'),
|
|
2615
|
+
opt(800, 'typography.weight800'),
|
|
2616
|
+
],
|
|
2401
2617
|
},
|
|
2402
2618
|
{
|
|
2403
2619
|
key: 'displayTransform',
|
|
2404
2620
|
labelKey: 'typography.transform',
|
|
2405
|
-
options: [
|
|
2621
|
+
options: [
|
|
2622
|
+
opt('auto', 'typography.transformAuto'),
|
|
2623
|
+
opt('none', 'typography.transformNone'),
|
|
2624
|
+
opt('uppercase', 'typography.transformUpper'),
|
|
2625
|
+
],
|
|
2626
|
+
},
|
|
2627
|
+
];
|
|
2628
|
+
shapeGroups = [
|
|
2629
|
+
{
|
|
2630
|
+
key: 'button',
|
|
2631
|
+
labelKey: 'shape.button',
|
|
2632
|
+
options: [opt('pill', 'shape.buttonPill'), opt('rounded', 'shape.buttonRounded'), opt('sharp', 'shape.buttonSharp')],
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
key: 'input',
|
|
2636
|
+
labelKey: 'shape.input',
|
|
2637
|
+
options: [opt('filled', 'shape.inputFilled'), opt('outline', 'shape.inputOutline'), opt('underline', 'shape.inputUnderline')],
|
|
2406
2638
|
},
|
|
2407
2639
|
];
|
|
2408
|
-
|
|
2640
|
+
sharedStructureGroups = [
|
|
2409
2641
|
{
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2642
|
+
key: 'density',
|
|
2643
|
+
labelKey: 'structure.density',
|
|
2644
|
+
options: [
|
|
2645
|
+
opt('compact', 'structure.densityCompact'),
|
|
2646
|
+
opt('comfortable', 'structure.densityComfortable'),
|
|
2647
|
+
opt('spacious', 'structure.densitySpacious'),
|
|
2414
2648
|
],
|
|
2415
2649
|
},
|
|
2416
2650
|
{
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2651
|
+
key: 'border',
|
|
2652
|
+
labelKey: 'structure.border',
|
|
2653
|
+
options: [
|
|
2654
|
+
opt('hairline', 'structure.borderHairline'),
|
|
2655
|
+
opt('normal', 'structure.borderNormal'),
|
|
2656
|
+
opt('thick', 'structure.borderThick'),
|
|
2421
2657
|
],
|
|
2422
2658
|
},
|
|
2659
|
+
];
|
|
2660
|
+
motionGroups = [
|
|
2423
2661
|
{
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2662
|
+
key: 'intensity',
|
|
2663
|
+
labelKey: 'motion.intensity',
|
|
2664
|
+
options: [
|
|
2665
|
+
opt('none', 'motion.intensityNone'),
|
|
2666
|
+
opt('subtle', 'motion.intensitySubtle'),
|
|
2667
|
+
opt('smooth', 'motion.intensitySmooth'),
|
|
2668
|
+
opt('expressive', 'motion.intensityExpressive'),
|
|
2669
|
+
],
|
|
2670
|
+
},
|
|
2671
|
+
{
|
|
2672
|
+
key: 'reveal',
|
|
2673
|
+
labelKey: 'motion.reveal',
|
|
2674
|
+
options: [
|
|
2675
|
+
opt('rise', 'motion.revealRise'),
|
|
2676
|
+
opt('fade', 'motion.revealFade'),
|
|
2677
|
+
opt('pop', 'motion.revealPop'),
|
|
2678
|
+
opt('slide', 'motion.revealSlide'),
|
|
2679
|
+
opt('zoom', 'motion.revealZoom'),
|
|
2680
|
+
],
|
|
2681
|
+
},
|
|
2682
|
+
{
|
|
2683
|
+
key: 'motionDuration',
|
|
2684
|
+
labelKey: 'motion.duration',
|
|
2685
|
+
options: [opt('fast', 'motion.durationFast'), opt('normal', 'motion.durationNormal'), opt('slow', 'motion.durationSlow')],
|
|
2686
|
+
},
|
|
2687
|
+
{
|
|
2688
|
+
key: 'overlayBlur',
|
|
2689
|
+
labelKey: 'motion.overlayBlur',
|
|
2690
|
+
options: [
|
|
2691
|
+
opt('none', 'motion.overlayNone'),
|
|
2692
|
+
opt('soft', 'motion.overlaySoft'),
|
|
2693
|
+
opt('medium', 'motion.overlayMedium'),
|
|
2694
|
+
opt('strong', 'motion.overlayStrong'),
|
|
2442
2695
|
],
|
|
2443
2696
|
},
|
|
2444
2697
|
];
|
|
@@ -2460,8 +2713,16 @@ class SolThemeStudioComponent {
|
|
|
2460
2713
|
{ key: 'textureColor2', labelKey: 'texture.color2' },
|
|
2461
2714
|
];
|
|
2462
2715
|
modeStructureGroups = [
|
|
2463
|
-
{
|
|
2464
|
-
|
|
2716
|
+
{
|
|
2717
|
+
key: 'sidebar',
|
|
2718
|
+
labelKey: 'structure.sidebar',
|
|
2719
|
+
options: [opt('light', 'structure.sidebarLight'), opt('dark', 'structure.sidebarDark'), opt('accent', 'structure.sidebarAccent')],
|
|
2720
|
+
},
|
|
2721
|
+
{
|
|
2722
|
+
key: 'header',
|
|
2723
|
+
labelKey: 'structure.header',
|
|
2724
|
+
options: [opt('translucent', 'structure.headerTranslucent'), opt('solid', 'structure.headerSolid')],
|
|
2725
|
+
},
|
|
2465
2726
|
];
|
|
2466
2727
|
/** Secciones de color por modo (Color + Roles de estado), con sugerencias del modo activo. */
|
|
2467
2728
|
colorSections = computed(() => {
|
|
@@ -2478,7 +2739,7 @@ class SolThemeStudioComponent {
|
|
|
2478
2739
|
titleKey: 'color.title',
|
|
2479
2740
|
fields: [
|
|
2480
2741
|
field('primary', 'color.primary'),
|
|
2481
|
-
field('accent', 'color.accent'),
|
|
2742
|
+
field('accent', 'color.accent', 'color.accentHint'),
|
|
2482
2743
|
field('pageBg', 'color.pageBg'),
|
|
2483
2744
|
field('surfaceBg', 'color.surfaceBg'),
|
|
2484
2745
|
field('secondary', 'color.secondary'),
|
|
@@ -2530,13 +2791,32 @@ class SolThemeStudioComponent {
|
|
|
2530
2791
|
error: () => this.loadState.set('error'),
|
|
2531
2792
|
});
|
|
2532
2793
|
}
|
|
2533
|
-
/** Vuelca un ThemeFile en el formulario, la marca, el nombre, el pie y
|
|
2794
|
+
/** Vuelca un ThemeFile en el formulario, la marca, el nombre, el pie, el favicon y los opcionales. */
|
|
2534
2795
|
hydrateFrom(theme) {
|
|
2535
|
-
|
|
2796
|
+
const form = mapThemeFileToForm(theme, DEFAULT_STUDIO_FORM);
|
|
2797
|
+
const meta = theme.meta;
|
|
2798
|
+
const variantKey = this.feature().tableVariantMetaKey;
|
|
2799
|
+
const metaVariant = variantKey ? meta[variantKey] : undefined;
|
|
2800
|
+
if (typeof metaVariant === 'string' && SOL_TABLE_VARIANTS.includes(metaVariant)) {
|
|
2801
|
+
form.tableVariant = metaVariant;
|
|
2802
|
+
}
|
|
2803
|
+
this.form.set(form);
|
|
2536
2804
|
this.brandForm.set({ ...theme.meta.logo });
|
|
2537
2805
|
this.themeName.set(theme.meta.name ?? '');
|
|
2538
2806
|
this.tagline.set(theme.meta.tagline ?? '');
|
|
2539
2807
|
this.favicon.set(theme.meta.favicon ?? '');
|
|
2808
|
+
const loader = meta['loader'];
|
|
2809
|
+
this.loaderForm.set({
|
|
2810
|
+
...DEFAULT_LOADER_CONFIG,
|
|
2811
|
+
...(loader && typeof loader === 'object' ? loader : {}),
|
|
2812
|
+
});
|
|
2813
|
+
}
|
|
2814
|
+
// ── Panel lateral de la vista previa (bajo 1024px) ──
|
|
2815
|
+
/** Escape cierra el panel lateral, salvo que la confirmación esté abierta encima (ese Escape es suyo). */
|
|
2816
|
+
closePreviewPanel() {
|
|
2817
|
+
if (this.previewOpenMobile() && !this.showApplyConfirm()) {
|
|
2818
|
+
this.previewOpenMobile.set(false);
|
|
2819
|
+
}
|
|
2540
2820
|
}
|
|
2541
2821
|
// ── Edición ──
|
|
2542
2822
|
setField(key, value) {
|
|
@@ -2547,7 +2827,7 @@ class SolThemeStudioComponent {
|
|
|
2547
2827
|
}
|
|
2548
2828
|
setModeColor(key, value) {
|
|
2549
2829
|
const mode = this.activeMode();
|
|
2550
|
-
this.form.update(form => ({ ...form, [mode]: { ...form[mode], [key]: value
|
|
2830
|
+
this.form.update(form => ({ ...form, [mode]: { ...form[mode], [key]: value } }));
|
|
2551
2831
|
}
|
|
2552
2832
|
setModeChoice(key, value) {
|
|
2553
2833
|
const mode = this.activeMode();
|
|
@@ -2556,6 +2836,9 @@ class SolThemeStudioComponent {
|
|
|
2556
2836
|
setBrandField(key, value) {
|
|
2557
2837
|
this.brandForm.update(brand => ({ ...brand, [key]: value }));
|
|
2558
2838
|
}
|
|
2839
|
+
setLoaderChoice(key, value) {
|
|
2840
|
+
this.loaderForm.update(loader => ({ ...loader, [key]: value }));
|
|
2841
|
+
}
|
|
2559
2842
|
onModeHexChange(key, event) {
|
|
2560
2843
|
const target = event.target;
|
|
2561
2844
|
const value = target.value.trim().toUpperCase();
|
|
@@ -2564,7 +2847,7 @@ class SolThemeStudioComponent {
|
|
|
2564
2847
|
this.setModeColor(key, normalized);
|
|
2565
2848
|
}
|
|
2566
2849
|
else {
|
|
2567
|
-
this.emitNotice('
|
|
2850
|
+
this.emitNotice('warning', 'alerts.invalidHex');
|
|
2568
2851
|
target.value = this.modeForm()[key];
|
|
2569
2852
|
}
|
|
2570
2853
|
}
|
|
@@ -2580,28 +2863,25 @@ class SolThemeStudioComponent {
|
|
|
2580
2863
|
fontStackFor(family) {
|
|
2581
2864
|
return `'${family}', ${SERIF_DISPLAY_FONTS.has(family) ? 'Georgia, serif' : 'system-ui, sans-serif'}`;
|
|
2582
2865
|
}
|
|
2583
|
-
// ── Imágenes (logo, logo oscuro, favicon) ──
|
|
2584
|
-
/** URL SANITIZADA de una imagen
|
|
2866
|
+
// ── Imágenes (logo, logo oscuro, favicon, imagen del indicador de carga) ──
|
|
2867
|
+
/** URL SANITIZADA de una imagen (para la miniatura); `null` sin imagen segura. */
|
|
2585
2868
|
imageUrl(target) {
|
|
2586
2869
|
const brand = this.brandForm();
|
|
2587
|
-
const raw = target === 'logo'
|
|
2870
|
+
const raw = target === 'logo'
|
|
2871
|
+
? brand.url
|
|
2872
|
+
: target === 'logoDark'
|
|
2873
|
+
? brand.urlDark
|
|
2874
|
+
: target === 'favicon'
|
|
2875
|
+
? this.favicon()
|
|
2876
|
+
: this.loaderForm().image;
|
|
2588
2877
|
return sanitizeAssetUrl(raw);
|
|
2589
2878
|
}
|
|
2590
|
-
|
|
2591
|
-
this.pendingImageTarget = target;
|
|
2592
|
-
this.imageAccept.set(target === 'favicon' ? FAVICON_ACCEPT : LOGO_ACCEPT);
|
|
2593
|
-
const input = this.imageFileInput()?.nativeElement;
|
|
2594
|
-
if (input) {
|
|
2595
|
-
input.accept = this.imageAccept();
|
|
2596
|
-
input.click();
|
|
2597
|
-
}
|
|
2598
|
-
}
|
|
2599
|
-
onImageSelected(event) {
|
|
2879
|
+
onImageSelected(target, event) {
|
|
2600
2880
|
const input = event.target;
|
|
2601
2881
|
const file = input.files?.[0];
|
|
2602
2882
|
// Limpia la selección para que volver a elegir el MISMO archivo dispare `change`.
|
|
2603
2883
|
input.value = '';
|
|
2604
|
-
this.uploadImage(
|
|
2884
|
+
this.uploadImage(target, file);
|
|
2605
2885
|
}
|
|
2606
2886
|
/** Valida y sube una imagen con `store.uploadLogo`; la URL devuelta queda en el campo destino. */
|
|
2607
2887
|
uploadImage(target, file) {
|
|
@@ -2609,30 +2889,40 @@ class SolThemeStudioComponent {
|
|
|
2609
2889
|
if (!file || !upload)
|
|
2610
2890
|
return;
|
|
2611
2891
|
if (file.size > MAX_IMAGE_FILE_BYTES) {
|
|
2612
|
-
this.emitNotice('
|
|
2892
|
+
this.emitNotice('warning', 'brand.sizeError');
|
|
2613
2893
|
return;
|
|
2614
2894
|
}
|
|
2615
|
-
this.
|
|
2895
|
+
this.setUploading(target, true);
|
|
2616
2896
|
upload(file)
|
|
2617
2897
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2618
2898
|
.subscribe({
|
|
2619
2899
|
next: url => {
|
|
2620
|
-
this.
|
|
2900
|
+
this.setUploading(target, false);
|
|
2621
2901
|
this.setImage(target, url);
|
|
2622
2902
|
this.emitNotice('success', 'brand.uploaded');
|
|
2623
2903
|
},
|
|
2624
|
-
error: () => {
|
|
2625
|
-
this.
|
|
2626
|
-
this.emitNotice('error', 'brand.uploadError');
|
|
2904
|
+
error: (error) => {
|
|
2905
|
+
this.setUploading(target, false);
|
|
2906
|
+
this.emitNotice('error', 'brand.uploadError', undefined, extractStoreErrorMessage(error));
|
|
2627
2907
|
},
|
|
2628
2908
|
});
|
|
2629
2909
|
}
|
|
2910
|
+
setUploading(target, active) {
|
|
2911
|
+
if (target === 'favicon')
|
|
2912
|
+
this.uploadingFavicon.set(active);
|
|
2913
|
+
else if (target === 'loaderImage')
|
|
2914
|
+
this.uploadingLoaderImage.set(active);
|
|
2915
|
+
else
|
|
2916
|
+
this.uploadingLogo.set(active ? target : null);
|
|
2917
|
+
}
|
|
2630
2918
|
removeImage(target) {
|
|
2631
2919
|
this.setImage(target, target === 'logoDark' ? undefined : '');
|
|
2632
2920
|
}
|
|
2633
2921
|
setImage(target, url) {
|
|
2634
2922
|
if (target === 'favicon')
|
|
2635
2923
|
this.favicon.set(url ?? '');
|
|
2924
|
+
else if (target === 'loaderImage')
|
|
2925
|
+
this.loaderForm.update(loader => ({ ...loader, image: url ?? '' }));
|
|
2636
2926
|
else if (target === 'logoDark')
|
|
2637
2927
|
this.setBrandField('urlDark', url || undefined);
|
|
2638
2928
|
else
|
|
@@ -2648,12 +2938,16 @@ class SolThemeStudioComponent {
|
|
|
2648
2938
|
}
|
|
2649
2939
|
this.showApplyConfirm.set(true);
|
|
2650
2940
|
}
|
|
2651
|
-
/**
|
|
2941
|
+
/**
|
|
2942
|
+
* Persiste el tema en edición con `store.apply(...)`. Con el tema persistido lo empuja con
|
|
2943
|
+
* `ThemeService.setTenantTheme` (sin volver a pedirlo); sin él, `ThemeService.refresh()`.
|
|
2944
|
+
*/
|
|
2652
2945
|
confirmApply() {
|
|
2653
2946
|
const store = this.store;
|
|
2654
2947
|
if (!store || this.busy())
|
|
2655
2948
|
return;
|
|
2656
2949
|
const theme = this.effectiveTheme();
|
|
2950
|
+
// Guarda final: nunca se envía un tema que no resuelva en ambos modos.
|
|
2657
2951
|
if (!isRenderableTheme(theme)) {
|
|
2658
2952
|
this.showApplyConfirm.set(false);
|
|
2659
2953
|
this.emitNotice('error', 'alerts.invalidTheme');
|
|
@@ -2664,25 +2958,42 @@ class SolThemeStudioComponent {
|
|
|
2664
2958
|
.apply(theme, this.selectedVersion())
|
|
2665
2959
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2666
2960
|
.subscribe({
|
|
2667
|
-
next:
|
|
2961
|
+
next: result => {
|
|
2668
2962
|
this.applying.set(false);
|
|
2669
2963
|
this.showApplyConfirm.set(false);
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
this.status.set({ key: 'alerts.applied' });
|
|
2964
|
+
const persisted = isThemeFileLike(result) ? result : null;
|
|
2965
|
+
// Lo persistido puede diferir de lo enviado: uno irresoluble haría caer el shell al
|
|
2966
|
+
// tema por defecto en silencio, así que se avisa en vez de empujarlo.
|
|
2967
|
+
if (persisted && !isRenderableTheme(persisted)) {
|
|
2968
|
+
this.emitNotice('error', 'alerts.applyError');
|
|
2969
|
+
return;
|
|
2970
|
+
}
|
|
2678
2971
|
this.emitNotice('success', 'alerts.applied');
|
|
2972
|
+
const appliedTheme = persisted ?? theme;
|
|
2973
|
+
// El borrador importado (o la versión restaurada) se conserva: sus tokens no editados
|
|
2974
|
+
// siguen viajando intactos en lo que se exporte o se vuelva a aplicar.
|
|
2975
|
+
this.savedTheme.set(appliedTheme);
|
|
2976
|
+
if (persisted)
|
|
2977
|
+
this.themeService.setTenantTheme(persisted);
|
|
2978
|
+
else
|
|
2979
|
+
this.themeService.refresh();
|
|
2980
|
+
this.selectedVersion.set(null);
|
|
2679
2981
|
if (this.historyOpen())
|
|
2680
2982
|
this.loadHistory();
|
|
2983
|
+
if (this.feature().persistDefaultModeOnApply) {
|
|
2984
|
+
const appliedMode = this.form().defaultMode;
|
|
2985
|
+
this.themeService.setDarkMode(appliedMode === 'dark');
|
|
2986
|
+
this.activeMode.set(appliedMode);
|
|
2987
|
+
}
|
|
2988
|
+
else {
|
|
2989
|
+
this.activeMode.set(appliedTheme.meta.defaultMode ?? this.activeMode());
|
|
2990
|
+
}
|
|
2991
|
+
this.applied.emit(appliedTheme);
|
|
2681
2992
|
},
|
|
2682
|
-
error: () => {
|
|
2993
|
+
error: (error) => {
|
|
2683
2994
|
this.applying.set(false);
|
|
2684
2995
|
this.showApplyConfirm.set(false);
|
|
2685
|
-
this.emitNotice('error', 'alerts.applyError');
|
|
2996
|
+
this.emitNotice('error', 'alerts.applyError', undefined, extractStoreErrorMessage(error));
|
|
2686
2997
|
},
|
|
2687
2998
|
});
|
|
2688
2999
|
}
|
|
@@ -2707,22 +3018,31 @@ class SolThemeStudioComponent {
|
|
|
2707
3018
|
this.nextCursor.set(page.next);
|
|
2708
3019
|
this.historyLoading.set(false);
|
|
2709
3020
|
},
|
|
2710
|
-
error: () => {
|
|
2711
|
-
this.historyError.set('history.error');
|
|
3021
|
+
error: (error) => {
|
|
3022
|
+
this.historyError.set(this.storeError(error, 'history.error'));
|
|
2712
3023
|
this.historyLoading.set(false);
|
|
2713
3024
|
},
|
|
2714
3025
|
});
|
|
2715
3026
|
}
|
|
3027
|
+
/** Fecha del historial en el idioma activo, con la zona horaria configurada. */
|
|
2716
3028
|
versionDate(value) {
|
|
2717
3029
|
const date = new Date(value);
|
|
2718
3030
|
if (Number.isNaN(date.getTime()))
|
|
2719
3031
|
return value;
|
|
3032
|
+
const timeZone = this.versionTimeZone();
|
|
3033
|
+
const label = this.versionTimeZoneLabel();
|
|
3034
|
+
let text;
|
|
2720
3035
|
try {
|
|
2721
|
-
|
|
3036
|
+
text = new Intl.DateTimeFormat(this.i18n.activeLang(), {
|
|
3037
|
+
dateStyle: 'medium',
|
|
3038
|
+
timeStyle: 'medium',
|
|
3039
|
+
...(timeZone ? { timeZone } : {}),
|
|
3040
|
+
}).format(date);
|
|
2722
3041
|
}
|
|
2723
3042
|
catch {
|
|
2724
|
-
|
|
3043
|
+
text = date.toISOString();
|
|
2725
3044
|
}
|
|
3045
|
+
return label ? `${text} ${label}` : text;
|
|
2726
3046
|
}
|
|
2727
3047
|
/** Carga una versión del historial en el borrador (no la guarda: hay que confirmar Aplicar). */
|
|
2728
3048
|
previewVersion(id) {
|
|
@@ -2736,28 +3056,25 @@ class SolThemeStudioComponent {
|
|
|
2736
3056
|
.subscribe({
|
|
2737
3057
|
next: theme => {
|
|
2738
3058
|
try {
|
|
2739
|
-
this.loadDraft(parseThemeJson(JSON.stringify(theme), this.effectiveTheme(),
|
|
3059
|
+
this.loadDraft(parseThemeJson(JSON.stringify(theme), this.effectiveTheme(), this.parseOptions()));
|
|
2740
3060
|
this.selectedVersion.set(id);
|
|
3061
|
+
this.previewOpenMobile.set(true);
|
|
2741
3062
|
this.status.set({ key: 'history.versionLoaded', params: { id } });
|
|
2742
|
-
this.openCompactPreview();
|
|
2743
3063
|
}
|
|
2744
3064
|
catch (error) {
|
|
2745
|
-
this.historyError.set(this.
|
|
3065
|
+
this.historyError.set(error instanceof ThemeImportError ? this.importError(error) : { key: 'history.versionInvalid' });
|
|
2746
3066
|
}
|
|
2747
3067
|
finally {
|
|
2748
3068
|
this.versionLoading.set(false);
|
|
2749
3069
|
}
|
|
2750
3070
|
},
|
|
2751
|
-
error: () => {
|
|
2752
|
-
this.historyError.set('history.versionError');
|
|
3071
|
+
error: (error) => {
|
|
3072
|
+
this.historyError.set(this.storeError(error, 'history.versionError'));
|
|
2753
3073
|
this.versionLoading.set(false);
|
|
2754
3074
|
},
|
|
2755
3075
|
});
|
|
2756
3076
|
}
|
|
2757
3077
|
// ── JSON ──
|
|
2758
|
-
openJsonPicker() {
|
|
2759
|
-
this.themeJsonInput()?.nativeElement.click();
|
|
2760
|
-
}
|
|
2761
3078
|
importJson(event) {
|
|
2762
3079
|
const input = event.target;
|
|
2763
3080
|
const file = input.files?.[0];
|
|
@@ -2773,23 +3090,36 @@ class SolThemeStudioComponent {
|
|
|
2773
3090
|
if (file.size > MAX_THEME_JSON_BYTES)
|
|
2774
3091
|
throw new ThemeImportError('too-large');
|
|
2775
3092
|
const text = await file.text();
|
|
2776
|
-
this.loadDraft(parseThemeJson(text, this.effectiveTheme(),
|
|
3093
|
+
this.loadDraft(parseThemeJson(text, this.effectiveTheme(), this.parseOptions()));
|
|
2777
3094
|
this.selectedVersion.set(null);
|
|
3095
|
+
this.previewOpenMobile.set(true);
|
|
2778
3096
|
this.status.set({ key: 'import.loaded' });
|
|
2779
|
-
this.emitNotice('info', 'import.loaded');
|
|
2780
|
-
this.openCompactPreview();
|
|
2781
3097
|
}
|
|
2782
3098
|
catch (error) {
|
|
2783
|
-
|
|
2784
|
-
this.status.set({ key });
|
|
2785
|
-
this.emitNotice('error', key);
|
|
3099
|
+
this.status.set(error instanceof ThemeImportError ? this.importError(error) : { key: 'import.readError' });
|
|
2786
3100
|
}
|
|
2787
3101
|
finally {
|
|
2788
3102
|
this.importing.set(false);
|
|
2789
3103
|
}
|
|
2790
3104
|
}
|
|
2791
|
-
|
|
2792
|
-
|
|
3105
|
+
parseOptions() {
|
|
3106
|
+
const feature = this.feature();
|
|
3107
|
+
return {
|
|
3108
|
+
metaExtras: this.metaExtras(),
|
|
3109
|
+
metaExtrasSchema: this.metaExtrasSchema(),
|
|
3110
|
+
loader: feature.loader,
|
|
3111
|
+
tableVariantMetaKey: feature.tableVariantMetaKey,
|
|
3112
|
+
};
|
|
3113
|
+
}
|
|
3114
|
+
/** Texto de un error del importador; la ruta solo se muestra cuando señala el campo a corregir. */
|
|
3115
|
+
importError(error) {
|
|
3116
|
+
const at = error.pathVisible && error.path ? this.t('import.error.at', { path: error.path }) : '';
|
|
3117
|
+
return { key: `import.error.${error.code}`, params: { at } };
|
|
3118
|
+
}
|
|
3119
|
+
/** Mensaje del store (p. ej. el del backend) o, sin él, el texto por defecto. */
|
|
3120
|
+
storeError(error, fallbackKey) {
|
|
3121
|
+
const message = extractStoreErrorMessage(error);
|
|
3122
|
+
return message ? { text: message } : { key: fallbackKey };
|
|
2793
3123
|
}
|
|
2794
3124
|
/** Borrador desde un tema externo: hidrata los controles y conserva sus tokens no editados. */
|
|
2795
3125
|
loadDraft(theme) {
|
|
@@ -2805,7 +3135,8 @@ class SolThemeStudioComponent {
|
|
|
2805
3135
|
const url = URL.createObjectURL(blob);
|
|
2806
3136
|
const anchor = document.createElement('a');
|
|
2807
3137
|
anchor.href = url;
|
|
2808
|
-
anchor.download =
|
|
3138
|
+
anchor.download =
|
|
3139
|
+
this.exportFileName() ?? `${(theme.meta.tenant || 'theme').replace(/[^a-z0-9_-]/gi, '-')}-theme.json`;
|
|
2809
3140
|
anchor.click();
|
|
2810
3141
|
setTimeout(() => URL.revokeObjectURL(url), 1000);
|
|
2811
3142
|
this.status.set({ key: 'import.exported' });
|
|
@@ -2818,18 +3149,17 @@ class SolThemeStudioComponent {
|
|
|
2818
3149
|
}
|
|
2819
3150
|
const clipboard = typeof navigator !== 'undefined' ? navigator.clipboard : undefined;
|
|
2820
3151
|
if (!clipboard?.writeText) {
|
|
2821
|
-
this.emitNotice('
|
|
3152
|
+
this.emitNotice('warning', 'alerts.copyError');
|
|
2822
3153
|
return;
|
|
2823
3154
|
}
|
|
2824
|
-
clipboard.writeText(JSON.stringify(theme, null, 2)).then(() => this.emitNotice('success', 'alerts.copied'), () => this.emitNotice('
|
|
2825
|
-
}
|
|
2826
|
-
// ── Vista previa en pantallas angostas ──
|
|
2827
|
-
openCompactPreview() {
|
|
2828
|
-
if (typeof window !== 'undefined' && window.innerWidth < DESKTOP_MIN_WIDTH) {
|
|
2829
|
-
this.previewOpenCompact.set(true);
|
|
2830
|
-
}
|
|
3155
|
+
clipboard.writeText(JSON.stringify(theme, null, 2)).then(() => this.emitNotice('success', 'alerts.copied'), () => this.emitNotice('warning', 'alerts.copyError'));
|
|
2831
3156
|
}
|
|
2832
3157
|
// ── Divisor arrastrable (escritorio) ──
|
|
3158
|
+
/**
|
|
3159
|
+
* Inicia el arrastre del divisor. Captura el puntero sobre el propio divisor, así los
|
|
3160
|
+
* `pointermove`/`pointerup` llegan aunque el cursor se salga; el reparto se calcula contra el
|
|
3161
|
+
* rectángulo del grid medido al empezar.
|
|
3162
|
+
*/
|
|
2833
3163
|
startResize(event) {
|
|
2834
3164
|
const grid = this.gridContainer()?.nativeElement;
|
|
2835
3165
|
const divider = event.currentTarget;
|
|
@@ -2860,6 +3190,7 @@ class SolThemeStudioComponent {
|
|
|
2860
3190
|
divider.addEventListener('pointerup', onEnd);
|
|
2861
3191
|
divider.addEventListener('pointercancel', onEnd);
|
|
2862
3192
|
}
|
|
3193
|
+
/** Teclado sobre el divisor: flechas mueven de a 2 puntos; Inicio/Fin van a los topes. */
|
|
2863
3194
|
onDividerKeydown(event) {
|
|
2864
3195
|
const next = event.key === 'ArrowLeft'
|
|
2865
3196
|
? this.studioSplit() - SPLIT_STEP
|
|
@@ -2876,6 +3207,7 @@ class SolThemeStudioComponent {
|
|
|
2876
3207
|
this.studioSplit.set(clampSplit(next));
|
|
2877
3208
|
this.persistSplit();
|
|
2878
3209
|
}
|
|
3210
|
+
/** Doble clic sobre el divisor: vuelve al reparto por defecto. */
|
|
2879
3211
|
resetSplit() {
|
|
2880
3212
|
this.studioSplit.set(SPLIT_DEFAULT);
|
|
2881
3213
|
this.persistSplit();
|
|
@@ -2889,8 +3221,17 @@ class SolThemeStudioComponent {
|
|
|
2889
3221
|
}
|
|
2890
3222
|
}
|
|
2891
3223
|
// ── Utilidades ──
|
|
2892
|
-
|
|
2893
|
-
|
|
3224
|
+
/** Resuelve un texto de estado (clave traducible o texto ya resuelto). */
|
|
3225
|
+
text(message) {
|
|
3226
|
+
return 'text' in message ? message.text : this.t(message.key, message.params);
|
|
3227
|
+
}
|
|
3228
|
+
/** Texto de la línea de estado del JSON (vacía sin estado). */
|
|
3229
|
+
statusText() {
|
|
3230
|
+
const current = this.status();
|
|
3231
|
+
return current ? this.text(current) : '';
|
|
3232
|
+
}
|
|
3233
|
+
emitNotice(kind, key, params, message) {
|
|
3234
|
+
this.notify.emit({ kind, messageKey: `sol.themeStudio.${key}`, message: message || this.t(key, params) });
|
|
2894
3235
|
}
|
|
2895
3236
|
/** Carga el catálogo curado de fuentes con la URL sanitizada por construcción (`buildGoogleFontsUrl`). */
|
|
2896
3237
|
injectStudioFonts() {
|
|
@@ -2910,11 +3251,13 @@ class SolThemeStudioComponent {
|
|
|
2910
3251
|
document.head.appendChild(link);
|
|
2911
3252
|
}
|
|
2912
3253
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolThemeStudioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2913
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SolThemeStudioComponent, isStandalone: true, selector: "sol-theme-studio", inputs: { baseTheme: { classPropertyName: "baseTheme", publicName: "baseTheme", isSignal: true, isRequired: false, transformFunction: null }, metaExtras: { classPropertyName: "metaExtras", publicName: "metaExtras", isSignal: true, isRequired: false, transformFunction: null } },
|
|
3254
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SolThemeStudioComponent, isStandalone: true, selector: "sol-theme-studio", inputs: { baseTheme: { classPropertyName: "baseTheme", publicName: "baseTheme", isSignal: true, isRequired: false, transformFunction: null }, metaExtras: { classPropertyName: "metaExtras", publicName: "metaExtras", isSignal: true, isRequired: false, transformFunction: null }, metaExtrasSchema: { classPropertyName: "metaExtrasSchema", publicName: "metaExtrasSchema", isSignal: true, isRequired: false, transformFunction: null }, features: { classPropertyName: "features", publicName: "features", isSignal: true, isRequired: false, transformFunction: null }, footerPlaceholder: { classPropertyName: "footerPlaceholder", publicName: "footerPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, exportFileName: { classPropertyName: "exportFileName", publicName: "exportFileName", isSignal: true, isRequired: false, transformFunction: null }, versionTimeZone: { classPropertyName: "versionTimeZone", publicName: "versionTimeZone", isSignal: true, isRequired: false, transformFunction: null }, versionTimeZoneLabel: { classPropertyName: "versionTimeZoneLabel", publicName: "versionTimeZoneLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { applied: "applied", notify: "notify" }, host: { listeners: { "document:keydown.escape": "closePreviewPanel()" } }, viewQueries: [{ propertyName: "gridContainer", first: true, predicate: ["gridContainer"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2914
3255
|
<div class="studio">
|
|
2915
3256
|
<header class="studio-header">
|
|
2916
|
-
<
|
|
2917
|
-
|
|
3257
|
+
<div>
|
|
3258
|
+
<h1 class="studio-title">{{ t('title') }}</h1>
|
|
3259
|
+
<p class="studio-subtitle">{{ t('subtitle') }}</p>
|
|
3260
|
+
</div>
|
|
2918
3261
|
</header>
|
|
2919
3262
|
|
|
2920
3263
|
@switch (loadState()) {
|
|
@@ -2945,42 +3288,30 @@ class SolThemeStudioComponent {
|
|
|
2945
3288
|
}
|
|
2946
3289
|
|
|
2947
3290
|
@if (canBrowseHistory) {
|
|
2948
|
-
<section class="history-panel" data-testid="studio-history-panel">
|
|
3291
|
+
<section class="history-panel" data-testid="studio-history-panel" [attr.aria-label]="t('history.ariaLabel')">
|
|
2949
3292
|
<sol-button
|
|
2950
3293
|
data-testid="studio-history"
|
|
2951
3294
|
size="touch"
|
|
2952
3295
|
variant="secondary"
|
|
2953
3296
|
[attr.aria-expanded]="historyOpen()"
|
|
2954
3297
|
(clicked)="toggleHistory()"
|
|
2955
|
-
>
|
|
2956
|
-
<sol-icon name="clock" size="sm" />
|
|
2957
|
-
{{ t('history.toggle') }}
|
|
2958
|
-
</sol-button>
|
|
3298
|
+
>{{ t('history.toggle') }}</sol-button>
|
|
2959
3299
|
@if (historyOpen()) {
|
|
2960
3300
|
<p class="field-hint">{{ t('history.hint') }}</p>
|
|
2961
|
-
@if (historyLoading()) {
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
<div class="inline-error" role="alert" data-testid="history-error">
|
|
2966
|
-
<span>{{ t(errorKey) }}</span>
|
|
2967
|
-
<sol-button size="touch" variant="ghost" (clicked)="loadHistory()">{{ t('history.retry') }}</sol-button>
|
|
2968
|
-
</div>
|
|
3301
|
+
@if (historyLoading()) { <p role="status" data-testid="history-loading">{{ t('history.loading') }}</p> }
|
|
3302
|
+
@if (historyError(); as error) {
|
|
3303
|
+
<p role="alert" data-testid="history-error">{{ text(error) }}</p>
|
|
3304
|
+
<sol-button data-testid="history-retry" size="touch" variant="ghost" (clicked)="loadHistory()">{{ t('history.retry') }}</sol-button>
|
|
2969
3305
|
}
|
|
2970
3306
|
@if (!historyLoading() && !historyError() && versions().length === 0) {
|
|
2971
|
-
<p
|
|
3307
|
+
<p data-testid="history-empty">{{ t('history.empty') }}</p>
|
|
2972
3308
|
}
|
|
2973
3309
|
<ul class="history-list" data-testid="history-list">
|
|
2974
3310
|
@for (version of versions(); track version.id) {
|
|
2975
3311
|
<li>
|
|
2976
|
-
<div>
|
|
2977
|
-
<
|
|
2978
|
-
|
|
2979
|
-
<p class="field-hint">
|
|
2980
|
-
{{ version.initialCapture ? t('history.initialCapture') : (version.userName ?? t('history.unknownUser')) }}
|
|
2981
|
-
@if (version.sourceVersionId !== null) {
|
|
2982
|
-
· {{ t('history.basedOn', { id: version.sourceVersionId }) }}
|
|
2983
|
-
}
|
|
3312
|
+
<div><strong>{{ t('history.version', { id: version.id }) }}</strong> · {{ versionDate(version.appliedAt) }}
|
|
3313
|
+
<p class="field-hint">{{ version.initialCapture ? t('history.initialCapture') : (version.userName ?? '') }}
|
|
3314
|
+
@if (version.sourceVersionId) { · {{ t('history.basedOn', { id: version.sourceVersionId }) }} }
|
|
2984
3315
|
</p>
|
|
2985
3316
|
</div>
|
|
2986
3317
|
<sol-button
|
|
@@ -2989,93 +3320,134 @@ class SolThemeStudioComponent {
|
|
|
2989
3320
|
[attr.data-testid]="'history-preview-' + version.id"
|
|
2990
3321
|
[disabled]="busy()"
|
|
2991
3322
|
(clicked)="previewVersion(version.id)"
|
|
2992
|
-
>
|
|
2993
|
-
{{ t('history.preview') }}
|
|
2994
|
-
</sol-button>
|
|
3323
|
+
>{{ t('history.preview') }}</sol-button>
|
|
2995
3324
|
</li>
|
|
2996
3325
|
}
|
|
2997
3326
|
</ul>
|
|
2998
|
-
@if (versionLoading()) {
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
@if (nextCursor() !== null && !historyLoading()) {
|
|
3002
|
-
<sol-button data-testid="history-more" size="touch" variant="ghost" (clicked)="loadHistory(true)">
|
|
3003
|
-
{{ t('history.loadMore') }}
|
|
3004
|
-
</sol-button>
|
|
3327
|
+
@if (versionLoading()) { <p role="status" data-testid="history-version-loading">{{ t('history.versionLoading') }}</p> }
|
|
3328
|
+
@if (nextCursor() && !historyLoading()) {
|
|
3329
|
+
<sol-button data-testid="history-more" size="touch" variant="ghost" (clicked)="loadHistory(true)">{{ t('history.loadMore') }}</sol-button>
|
|
3005
3330
|
}
|
|
3006
3331
|
}
|
|
3007
3332
|
</section>
|
|
3008
3333
|
}
|
|
3334
|
+
<input #themeJsonInput type="file" hidden accept=".json,application/json" data-testid="studio-json-file" (change)="importJson($event)" />
|
|
3009
3335
|
|
|
3010
|
-
<
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
/>
|
|
3018
|
-
|
|
3019
|
-
<div class="studio-grid" #gridContainer [class.is-resizing]="resizing()" [style.--studio-split]="studioSplit() + '%'">
|
|
3336
|
+
<div
|
|
3337
|
+
class="studio-grid"
|
|
3338
|
+
#gridContainer
|
|
3339
|
+
[class.is-resizing]="resizing()"
|
|
3340
|
+
[style.--studio-split]="studioSplit() + '%'"
|
|
3341
|
+
>
|
|
3342
|
+
<!-- Controles: columna izquierda del reparto en escritorio; ancho completo bajo 1024px. -->
|
|
3020
3343
|
<div class="controls">
|
|
3344
|
+
<!-- ── Compartido (claro y oscuro) ── -->
|
|
3021
3345
|
<p class="group-title">{{ t('group.shared') }}</p>
|
|
3022
3346
|
|
|
3023
3347
|
<!-- Marca -->
|
|
3024
|
-
<section class="control-card">
|
|
3348
|
+
<section class="control-card" solReveal [solRevealIndex]="0">
|
|
3025
3349
|
<h2 class="card-title">{{ t('brand.title') }}</h2>
|
|
3026
|
-
|
|
3027
|
-
<span class="control-label">{{ t('brand.name') }}</span>
|
|
3028
|
-
<input
|
|
3029
|
-
class="text-input"
|
|
3030
|
-
type="text"
|
|
3031
|
-
maxlength="80"
|
|
3032
|
-
data-testid="brand-name"
|
|
3033
|
-
[value]="themeName()"
|
|
3034
|
-
[placeholder]="t('brand.namePlaceholder')"
|
|
3035
|
-
(change)="themeName.set(inputValue($event))"
|
|
3036
|
-
/>
|
|
3037
|
-
</label>
|
|
3038
|
-
@for (slot of logoSlots; track slot.target) {
|
|
3350
|
+
@if (feature().themeName) {
|
|
3039
3351
|
<div class="control-row">
|
|
3040
|
-
<span class="control-label">{{ t(
|
|
3041
|
-
<
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
[loading]="uploading() === slot.target"
|
|
3051
|
-
[disabled]="uploading() !== null"
|
|
3052
|
-
(clicked)="openFilePicker(slot.target)"
|
|
3053
|
-
>
|
|
3054
|
-
<sol-icon name="photo" size="sm" />
|
|
3055
|
-
{{ t('brand.attach') }}
|
|
3056
|
-
</sol-button>
|
|
3057
|
-
}
|
|
3058
|
-
@if (imageUrl(slot.target)) {
|
|
3059
|
-
<sol-button
|
|
3060
|
-
variant="ghost"
|
|
3061
|
-
size="sm"
|
|
3062
|
-
[attr.data-testid]="'remove-' + slot.target"
|
|
3063
|
-
[disabled]="uploading() !== null"
|
|
3064
|
-
(clicked)="removeImage(slot.target)"
|
|
3065
|
-
>
|
|
3066
|
-
<sol-icon name="trash" size="sm" />
|
|
3067
|
-
{{ t('brand.remove') }}
|
|
3068
|
-
</sol-button>
|
|
3069
|
-
}
|
|
3070
|
-
</div>
|
|
3352
|
+
<span class="control-label">{{ t('brand.name') }}</span>
|
|
3353
|
+
<input
|
|
3354
|
+
class="text-input"
|
|
3355
|
+
type="text"
|
|
3356
|
+
maxlength="80"
|
|
3357
|
+
data-testid="brand-name"
|
|
3358
|
+
[value]="themeName()"
|
|
3359
|
+
[placeholder]="t('brand.namePlaceholder')"
|
|
3360
|
+
(change)="themeName.set(inputValue($event))"
|
|
3361
|
+
/>
|
|
3071
3362
|
</div>
|
|
3072
3363
|
}
|
|
3073
|
-
|
|
3074
|
-
<
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3364
|
+
<div class="control-row">
|
|
3365
|
+
<span class="control-label">{{ t('brand.logo') }}</span>
|
|
3366
|
+
<div class="swatch-row">
|
|
3367
|
+
@if (imageUrl('logo'); as url) {
|
|
3368
|
+
<img class="logo-thumb" [src]="url" [alt]="t('brand.logoAlt')" />
|
|
3369
|
+
}
|
|
3370
|
+
@if (canUpload) {
|
|
3371
|
+
<sol-button
|
|
3372
|
+
type="button"
|
|
3373
|
+
data-testid="brand-logo-attach"
|
|
3374
|
+
variant="ghost"
|
|
3375
|
+
size="sm"
|
|
3376
|
+
[loading]="uploadingLogo() === 'logo'"
|
|
3377
|
+
[disabled]="uploadingLogo() !== null"
|
|
3378
|
+
(clicked)="logoFileInput.click()"
|
|
3379
|
+
>
|
|
3380
|
+
<sol-icon name="image" size="sm" />
|
|
3381
|
+
{{ t('brand.attach') }}
|
|
3382
|
+
</sol-button>
|
|
3383
|
+
}
|
|
3384
|
+
@if (brandForm().url) {
|
|
3385
|
+
<sol-button
|
|
3386
|
+
type="button"
|
|
3387
|
+
data-testid="brand-logo-remove"
|
|
3388
|
+
variant="ghost"
|
|
3389
|
+
size="sm"
|
|
3390
|
+
[disabled]="uploadingLogo() !== null"
|
|
3391
|
+
(clicked)="removeImage('logo')"
|
|
3392
|
+
>
|
|
3393
|
+
<sol-icon name="trash" size="sm" />
|
|
3394
|
+
{{ t('brand.remove') }}
|
|
3395
|
+
</sol-button>
|
|
3396
|
+
}
|
|
3397
|
+
<input
|
|
3398
|
+
#logoFileInput
|
|
3399
|
+
type="file"
|
|
3400
|
+
hidden
|
|
3401
|
+
data-testid="brand-logo-file"
|
|
3402
|
+
[attr.accept]="logoAccept"
|
|
3403
|
+
(change)="onImageSelected('logo', $event)"
|
|
3404
|
+
/>
|
|
3405
|
+
</div>
|
|
3406
|
+
</div>
|
|
3407
|
+
<div class="control-row">
|
|
3408
|
+
<span class="control-label">{{ t('brand.logoDark') }}</span>
|
|
3409
|
+
<div class="swatch-row">
|
|
3410
|
+
@if (imageUrl('logoDark'); as url) {
|
|
3411
|
+
<img class="logo-thumb" [src]="url" [alt]="t('brand.logoDarkAlt')" />
|
|
3412
|
+
}
|
|
3413
|
+
@if (canUpload) {
|
|
3414
|
+
<sol-button
|
|
3415
|
+
type="button"
|
|
3416
|
+
data-testid="brand-logo-dark-attach"
|
|
3417
|
+
variant="ghost"
|
|
3418
|
+
size="sm"
|
|
3419
|
+
[loading]="uploadingLogo() === 'logoDark'"
|
|
3420
|
+
[disabled]="uploadingLogo() !== null"
|
|
3421
|
+
(clicked)="logoDarkFileInput.click()"
|
|
3422
|
+
>
|
|
3423
|
+
<sol-icon name="image" size="sm" />
|
|
3424
|
+
{{ t('brand.attach') }}
|
|
3425
|
+
</sol-button>
|
|
3426
|
+
}
|
|
3427
|
+
@if (brandForm().urlDark) {
|
|
3428
|
+
<sol-button
|
|
3429
|
+
type="button"
|
|
3430
|
+
data-testid="brand-logo-dark-remove"
|
|
3431
|
+
variant="ghost"
|
|
3432
|
+
size="sm"
|
|
3433
|
+
[disabled]="uploadingLogo() !== null"
|
|
3434
|
+
(clicked)="removeImage('logoDark')"
|
|
3435
|
+
>
|
|
3436
|
+
<sol-icon name="trash" size="sm" />
|
|
3437
|
+
{{ t('brand.remove') }}
|
|
3438
|
+
</sol-button>
|
|
3439
|
+
}
|
|
3440
|
+
<input
|
|
3441
|
+
#logoDarkFileInput
|
|
3442
|
+
type="file"
|
|
3443
|
+
hidden
|
|
3444
|
+
data-testid="brand-logo-dark-file"
|
|
3445
|
+
[attr.accept]="logoAccept"
|
|
3446
|
+
(change)="onImageSelected('logoDark', $event)"
|
|
3447
|
+
/>
|
|
3448
|
+
</div>
|
|
3449
|
+
</div>
|
|
3450
|
+
<div class="control-row">
|
|
3079
3451
|
<span class="control-label">{{ t('brand.altText') }}</span>
|
|
3080
3452
|
<input
|
|
3081
3453
|
class="text-input"
|
|
@@ -3085,8 +3457,8 @@ class SolThemeStudioComponent {
|
|
|
3085
3457
|
[placeholder]="t('brand.altTextPlaceholder')"
|
|
3086
3458
|
(change)="setBrandField('altText', inputValue($event))"
|
|
3087
3459
|
/>
|
|
3088
|
-
</
|
|
3089
|
-
<
|
|
3460
|
+
</div>
|
|
3461
|
+
<div class="control-row">
|
|
3090
3462
|
<span class="control-label">
|
|
3091
3463
|
{{ t('brand.width') }}
|
|
3092
3464
|
<b class="range-value">{{ brandForm().width }}px</b>
|
|
@@ -3094,84 +3466,253 @@ class SolThemeStudioComponent {
|
|
|
3094
3466
|
<input
|
|
3095
3467
|
type="range"
|
|
3096
3468
|
class="range"
|
|
3469
|
+
data-testid="range-brand-width"
|
|
3097
3470
|
[min]="brandWidthMin"
|
|
3098
3471
|
[max]="brandWidthMax"
|
|
3099
3472
|
step="1"
|
|
3100
3473
|
[value]="brandForm().width"
|
|
3101
3474
|
(input)="setBrandField('width', numberValue($event))"
|
|
3102
3475
|
/>
|
|
3103
|
-
</
|
|
3476
|
+
</div>
|
|
3477
|
+
<div class="control-row">
|
|
3478
|
+
<span class="control-label">{{ t('brand.favicon') }}</span>
|
|
3479
|
+
<div class="swatch-row">
|
|
3480
|
+
@if (imageUrl('favicon'); as url) {
|
|
3481
|
+
<img class="logo-thumb" [src]="url" [alt]="t('brand.faviconAlt')" />
|
|
3482
|
+
}
|
|
3483
|
+
@if (canUpload) {
|
|
3484
|
+
<sol-button
|
|
3485
|
+
type="button"
|
|
3486
|
+
data-testid="brand-favicon-attach"
|
|
3487
|
+
variant="ghost"
|
|
3488
|
+
size="sm"
|
|
3489
|
+
[loading]="uploadingFavicon()"
|
|
3490
|
+
[disabled]="uploadingFavicon()"
|
|
3491
|
+
(clicked)="faviconFileInput.click()"
|
|
3492
|
+
>
|
|
3493
|
+
<sol-icon name="image" size="sm" />
|
|
3494
|
+
{{ t('brand.attach') }}
|
|
3495
|
+
</sol-button>
|
|
3496
|
+
}
|
|
3497
|
+
@if (favicon()) {
|
|
3498
|
+
<sol-button
|
|
3499
|
+
type="button"
|
|
3500
|
+
data-testid="brand-favicon-remove"
|
|
3501
|
+
variant="ghost"
|
|
3502
|
+
size="sm"
|
|
3503
|
+
[disabled]="uploadingFavicon()"
|
|
3504
|
+
(clicked)="removeImage('favicon')"
|
|
3505
|
+
>
|
|
3506
|
+
<sol-icon name="trash" size="sm" />
|
|
3507
|
+
{{ t('brand.remove') }}
|
|
3508
|
+
</sol-button>
|
|
3509
|
+
}
|
|
3510
|
+
<input
|
|
3511
|
+
#faviconFileInput
|
|
3512
|
+
type="file"
|
|
3513
|
+
hidden
|
|
3514
|
+
data-testid="brand-favicon-file"
|
|
3515
|
+
[attr.accept]="faviconAccept"
|
|
3516
|
+
(change)="onImageSelected('favicon', $event)"
|
|
3517
|
+
/>
|
|
3518
|
+
</div>
|
|
3519
|
+
</div>
|
|
3520
|
+
<p class="field-hint">{{ t('brand.faviconHint') }}</p>
|
|
3521
|
+
@if (!canUpload) {
|
|
3522
|
+
<p class="field-hint" data-testid="upload-unavailable">{{ t('brand.uploadUnavailable') }}</p>
|
|
3523
|
+
}
|
|
3104
3524
|
</section>
|
|
3105
3525
|
|
|
3106
3526
|
<!-- Pie de página -->
|
|
3107
|
-
<section class="control-card">
|
|
3527
|
+
<section class="control-card" solReveal [solRevealIndex]="1">
|
|
3108
3528
|
<h2 class="card-title">{{ t('footer.title') }}</h2>
|
|
3109
|
-
<
|
|
3529
|
+
<div class="control-row">
|
|
3110
3530
|
<span class="control-label">{{ t('footer.text') }}</span>
|
|
3111
3531
|
<input
|
|
3112
3532
|
class="text-input"
|
|
3113
3533
|
type="text"
|
|
3114
|
-
maxlength="
|
|
3534
|
+
maxlength="200"
|
|
3115
3535
|
data-testid="footer-text"
|
|
3116
3536
|
[value]="tagline()"
|
|
3117
|
-
[placeholder]="t('footer.placeholder')"
|
|
3537
|
+
[placeholder]="footerPlaceholder() ?? t('footer.placeholder')"
|
|
3118
3538
|
(change)="tagline.set(inputValue($event))"
|
|
3119
3539
|
/>
|
|
3120
|
-
</
|
|
3540
|
+
</div>
|
|
3121
3541
|
</section>
|
|
3122
3542
|
|
|
3123
|
-
<!--
|
|
3124
|
-
|
|
3125
|
-
<
|
|
3126
|
-
|
|
3127
|
-
<
|
|
3128
|
-
|
|
3543
|
+
<!-- Diseño del inicio de sesión -->
|
|
3544
|
+
<section class="control-card" solReveal [solRevealIndex]="2">
|
|
3545
|
+
<h2 class="card-title">{{ t('auth.title') }}</h2>
|
|
3546
|
+
<div class="control-row">
|
|
3547
|
+
<span class="control-label">{{ t('auth.layout') }}</span>
|
|
3548
|
+
<div class="segmented">
|
|
3549
|
+
@for (option of authLayoutOptions; track option.value) {
|
|
3129
3550
|
<button
|
|
3130
3551
|
type="button"
|
|
3131
3552
|
class="seg-btn"
|
|
3132
|
-
[class.active]="form()
|
|
3133
|
-
[attr.
|
|
3134
|
-
|
|
3135
|
-
(click)="setChoice(group.key, option.value)"
|
|
3553
|
+
[class.active]="form().authLayout === option.value"
|
|
3554
|
+
[attr.data-testid]="'seg-authLayout-' + option.value"
|
|
3555
|
+
(click)="setChoice('authLayout', option.value)"
|
|
3136
3556
|
>
|
|
3137
3557
|
{{ t(option.labelKey) }}
|
|
3138
3558
|
</button>
|
|
3139
3559
|
}
|
|
3140
3560
|
</div>
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
}
|
|
3144
|
-
</section>
|
|
3145
|
-
}
|
|
3561
|
+
</div>
|
|
3562
|
+
</section>
|
|
3146
3563
|
|
|
3147
|
-
<!--
|
|
3148
|
-
<section class="control-card">
|
|
3149
|
-
<h2 class="card-title">{{ t('
|
|
3150
|
-
|
|
3564
|
+
<!-- Modo por defecto -->
|
|
3565
|
+
<section class="control-card" solReveal [solRevealIndex]="2">
|
|
3566
|
+
<h2 class="card-title">{{ t('defaultMode.title') }}</h2>
|
|
3567
|
+
<div class="control-row">
|
|
3568
|
+
<div class="segmented">
|
|
3569
|
+
@for (option of defaultModeOptions; track option.value) {
|
|
3570
|
+
<button
|
|
3571
|
+
type="button"
|
|
3572
|
+
class="seg-btn"
|
|
3573
|
+
[class.active]="form().defaultMode === option.value"
|
|
3574
|
+
[attr.data-testid]="'seg-defaultMode-' + option.value"
|
|
3575
|
+
(click)="setChoice('defaultMode', option.value)"
|
|
3576
|
+
>
|
|
3577
|
+
{{ t(option.labelKey) }}
|
|
3578
|
+
</button>
|
|
3579
|
+
}
|
|
3580
|
+
</div>
|
|
3581
|
+
</div>
|
|
3582
|
+
</section>
|
|
3583
|
+
|
|
3584
|
+
<!-- Tablas -->
|
|
3585
|
+
<section class="control-card" solReveal [solRevealIndex]="3">
|
|
3586
|
+
<h2 class="card-title">{{ t('table.title') }}</h2>
|
|
3587
|
+
<div class="control-row">
|
|
3588
|
+
<span class="control-label">{{ t('table.variant') }}</span>
|
|
3589
|
+
<div class="segmented">
|
|
3590
|
+
@for (option of tableVariantOptions; track option.value) {
|
|
3591
|
+
<button
|
|
3592
|
+
type="button"
|
|
3593
|
+
class="seg-btn"
|
|
3594
|
+
[class.active]="form().tableVariant === option.value"
|
|
3595
|
+
[attr.data-testid]="'seg-tableVariant-' + option.value"
|
|
3596
|
+
(click)="setChoice('tableVariant', option.value)"
|
|
3597
|
+
>
|
|
3598
|
+
{{ t(option.labelKey) }}
|
|
3599
|
+
</button>
|
|
3600
|
+
}
|
|
3601
|
+
</div>
|
|
3602
|
+
<p class="field-hint">{{ t('table.hint') }}</p>
|
|
3603
|
+
</div>
|
|
3604
|
+
</section>
|
|
3605
|
+
|
|
3606
|
+
<!-- Loader / spinner (opcional) -->
|
|
3607
|
+
@if (feature().loader) {
|
|
3608
|
+
<section class="control-card" solReveal [solRevealIndex]="3" data-testid="studio-loader-section">
|
|
3609
|
+
<h2 class="card-title">{{ t('loader.title') }}</h2>
|
|
3151
3610
|
<div class="control-row">
|
|
3152
|
-
<span class="control-label">{{ t(
|
|
3153
|
-
<div class="
|
|
3154
|
-
@
|
|
3611
|
+
<span class="control-label">{{ t('loader.image') }}</span>
|
|
3612
|
+
<div class="swatch-row">
|
|
3613
|
+
@if (imageUrl('loaderImage'); as url) {
|
|
3614
|
+
<img class="logo-thumb" [src]="url" [alt]="t('loader.imageAlt')" />
|
|
3615
|
+
}
|
|
3616
|
+
@if (canUpload) {
|
|
3617
|
+
<sol-button
|
|
3618
|
+
type="button"
|
|
3619
|
+
data-testid="loader-image-attach"
|
|
3620
|
+
variant="ghost"
|
|
3621
|
+
size="sm"
|
|
3622
|
+
[loading]="uploadingLoaderImage()"
|
|
3623
|
+
[disabled]="uploadingLoaderImage()"
|
|
3624
|
+
(clicked)="loaderFileInput.click()"
|
|
3625
|
+
>
|
|
3626
|
+
<sol-icon name="image" size="sm" />
|
|
3627
|
+
{{ t('brand.attach') }}
|
|
3628
|
+
</sol-button>
|
|
3629
|
+
}
|
|
3630
|
+
@if (loaderForm().image) {
|
|
3631
|
+
<sol-button
|
|
3632
|
+
type="button"
|
|
3633
|
+
data-testid="loader-image-remove"
|
|
3634
|
+
variant="ghost"
|
|
3635
|
+
size="sm"
|
|
3636
|
+
[disabled]="uploadingLoaderImage()"
|
|
3637
|
+
(clicked)="removeImage('loaderImage')"
|
|
3638
|
+
>
|
|
3639
|
+
<sol-icon name="trash" size="sm" />
|
|
3640
|
+
{{ t('brand.remove') }}
|
|
3641
|
+
</sol-button>
|
|
3642
|
+
}
|
|
3643
|
+
<input
|
|
3644
|
+
#loaderFileInput
|
|
3645
|
+
type="file"
|
|
3646
|
+
hidden
|
|
3647
|
+
data-testid="loader-image-file"
|
|
3648
|
+
[attr.accept]="logoAccept"
|
|
3649
|
+
(change)="onImageSelected('loaderImage', $event)"
|
|
3650
|
+
/>
|
|
3651
|
+
</div>
|
|
3652
|
+
</div>
|
|
3653
|
+
<div class="control-row">
|
|
3654
|
+
<span class="control-label">{{ t('loader.presentation') }}</span>
|
|
3655
|
+
<div class="segmented">
|
|
3656
|
+
@for (option of loaderPresentationOptions; track option.value) {
|
|
3155
3657
|
<button
|
|
3156
3658
|
type="button"
|
|
3157
|
-
class="
|
|
3158
|
-
[class.active]="
|
|
3159
|
-
|
|
3160
|
-
[style.font-family]="fontStackFor(family)"
|
|
3161
|
-
(click)="setField(role.key, family)"
|
|
3659
|
+
class="seg-btn"
|
|
3660
|
+
[class.active]="loaderForm().presentation === option.value"
|
|
3661
|
+
(click)="setLoaderChoice('presentation', option.value)"
|
|
3162
3662
|
>
|
|
3163
|
-
{{
|
|
3663
|
+
{{ t(option.labelKey) }}
|
|
3164
3664
|
</button>
|
|
3165
3665
|
}
|
|
3166
3666
|
</div>
|
|
3667
|
+
</div>
|
|
3668
|
+
<div class="control-row">
|
|
3669
|
+
<span class="control-label">{{ t('loader.animation') }}</span>
|
|
3670
|
+
<div class="segmented">
|
|
3671
|
+
@for (option of loaderAnimationOptions; track option.value) {
|
|
3672
|
+
<button
|
|
3673
|
+
type="button"
|
|
3674
|
+
class="seg-btn"
|
|
3675
|
+
[class.active]="loaderForm().animation === option.value"
|
|
3676
|
+
(click)="setLoaderChoice('animation', option.value)"
|
|
3677
|
+
>
|
|
3678
|
+
{{ t(option.labelKey) }}
|
|
3679
|
+
</button>
|
|
3680
|
+
}
|
|
3681
|
+
</div>
|
|
3682
|
+
<p class="field-hint">{{ t('loader.hint') }}</p>
|
|
3683
|
+
</div>
|
|
3684
|
+
</section>
|
|
3685
|
+
}
|
|
3686
|
+
|
|
3687
|
+
<!-- Tipografía -->
|
|
3688
|
+
<section class="control-card" solReveal [solRevealIndex]="3">
|
|
3689
|
+
<h2 class="card-title">{{ t('typography.title') }}</h2>
|
|
3690
|
+
@for (role of fontRoles; track role.key) {
|
|
3691
|
+
<div class="control-row">
|
|
3692
|
+
<span class="control-label">{{ t(role.labelKey) }}</span>
|
|
3693
|
+
<div class="font-list">
|
|
3694
|
+
@for (family of role.quick; track family) {
|
|
3695
|
+
<button
|
|
3696
|
+
type="button"
|
|
3697
|
+
class="font-btn"
|
|
3698
|
+
[class.active]="form()[role.key] === family"
|
|
3699
|
+
[style.font-family]="fontStackFor(family)"
|
|
3700
|
+
(click)="setField(role.key, family)"
|
|
3701
|
+
>
|
|
3702
|
+
{{ family }}
|
|
3703
|
+
</button>
|
|
3704
|
+
}
|
|
3705
|
+
</div>
|
|
3706
|
+
<p class="field-hint">{{ t('typography.moreFonts') }}</p>
|
|
3167
3707
|
<select
|
|
3168
3708
|
class="font-select"
|
|
3169
|
-
[attr.
|
|
3709
|
+
[attr.data-testid]="role.testId"
|
|
3170
3710
|
[value]="form()[role.key]"
|
|
3711
|
+
[style.font-family]="fontStackFor(form()[role.key])"
|
|
3171
3712
|
(change)="setField(role.key, inputValue($event))"
|
|
3172
3713
|
>
|
|
3173
3714
|
@for (family of role.catalog; track family) {
|
|
3174
|
-
<option [value]="family">{{ family }}</option>
|
|
3715
|
+
<option [value]="family" [style.font-family]="fontStackFor(family)">{{ family }}</option>
|
|
3175
3716
|
}
|
|
3176
3717
|
</select>
|
|
3177
3718
|
</div>
|
|
@@ -3181,52 +3722,138 @@ class SolThemeStudioComponent {
|
|
|
3181
3722
|
<span class="control-label">{{ t(group.labelKey) }}</span>
|
|
3182
3723
|
<div class="segmented">
|
|
3183
3724
|
@for (option of group.options; track option.value) {
|
|
3184
|
-
<button
|
|
3725
|
+
<button
|
|
3726
|
+
type="button"
|
|
3727
|
+
class="seg-btn"
|
|
3728
|
+
[class.active]="form()[group.key] === option.value"
|
|
3729
|
+
(click)="setChoice(group.key, option.value)"
|
|
3730
|
+
>
|
|
3185
3731
|
{{ t(option.labelKey) }}
|
|
3186
3732
|
</button>
|
|
3187
3733
|
}
|
|
3188
3734
|
</div>
|
|
3189
3735
|
</div>
|
|
3190
3736
|
}
|
|
3191
|
-
<
|
|
3192
|
-
<span class="control-label">
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
<
|
|
3197
|
-
|
|
3198
|
-
|
|
3737
|
+
<div class="control-row">
|
|
3738
|
+
<span class="control-label">
|
|
3739
|
+
{{ t('typography.baseSize') }}
|
|
3740
|
+
<b class="range-value">{{ form().baseSize }}px</b>
|
|
3741
|
+
</span>
|
|
3742
|
+
<input
|
|
3743
|
+
type="range"
|
|
3744
|
+
class="range"
|
|
3745
|
+
data-testid="range-base-size"
|
|
3746
|
+
[min]="baseSizeMin"
|
|
3747
|
+
[max]="baseSizeMax"
|
|
3748
|
+
step="0.5"
|
|
3749
|
+
[value]="form().baseSize"
|
|
3750
|
+
(input)="setField('baseSize', numberValue($event))"
|
|
3751
|
+
/>
|
|
3752
|
+
</div>
|
|
3753
|
+
<div class="control-row">
|
|
3754
|
+
<span class="control-label">
|
|
3755
|
+
{{ t('typography.lineHeight') }}
|
|
3756
|
+
<b class="range-value">{{ form().lineHeight }}</b>
|
|
3757
|
+
</span>
|
|
3758
|
+
<input
|
|
3759
|
+
type="range"
|
|
3760
|
+
class="range"
|
|
3761
|
+
data-testid="range-line-height"
|
|
3762
|
+
[min]="lineHeightMin"
|
|
3763
|
+
[max]="lineHeightMax"
|
|
3764
|
+
step="0.1"
|
|
3765
|
+
[value]="form().lineHeight"
|
|
3766
|
+
(input)="setField('lineHeight', numberValue($event))"
|
|
3767
|
+
/>
|
|
3768
|
+
</div>
|
|
3199
3769
|
</section>
|
|
3200
3770
|
|
|
3201
|
-
<!-- Forma
|
|
3202
|
-
|
|
3203
|
-
<
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3771
|
+
<!-- Forma -->
|
|
3772
|
+
<section class="control-card" solReveal [solRevealIndex]="4">
|
|
3773
|
+
<h2 class="card-title">{{ t('shape.title') }}</h2>
|
|
3774
|
+
<div class="control-row">
|
|
3775
|
+
<span class="control-label">
|
|
3776
|
+
{{ t('shape.radius') }}
|
|
3777
|
+
<b class="range-value">{{ form().radius }}px</b>
|
|
3778
|
+
</span>
|
|
3779
|
+
<input
|
|
3780
|
+
type="range"
|
|
3781
|
+
class="range"
|
|
3782
|
+
data-testid="range-radius"
|
|
3783
|
+
[min]="radiusMin"
|
|
3784
|
+
[max]="radiusMax"
|
|
3785
|
+
step="1"
|
|
3786
|
+
[value]="form().radius"
|
|
3787
|
+
(input)="setField('radius', numberValue($event))"
|
|
3788
|
+
/>
|
|
3789
|
+
</div>
|
|
3790
|
+
@for (group of shapeGroups; track group.key) {
|
|
3791
|
+
<div class="control-row">
|
|
3792
|
+
<span class="control-label">{{ t(group.labelKey) }}</span>
|
|
3793
|
+
<div class="segmented">
|
|
3794
|
+
@for (option of group.options; track option.value) {
|
|
3795
|
+
<button
|
|
3796
|
+
type="button"
|
|
3797
|
+
class="seg-btn"
|
|
3798
|
+
[class.active]="form()[group.key] === option.value"
|
|
3799
|
+
(click)="setChoice(group.key, option.value)"
|
|
3800
|
+
>
|
|
3801
|
+
{{ t(option.labelKey) }}
|
|
3802
|
+
</button>
|
|
3803
|
+
}
|
|
3221
3804
|
</div>
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3805
|
+
</div>
|
|
3806
|
+
}
|
|
3807
|
+
</section>
|
|
3225
3808
|
|
|
3226
|
-
<!--
|
|
3809
|
+
<!-- Densidad y bordes -->
|
|
3810
|
+
<section class="control-card" solReveal [solRevealIndex]="5">
|
|
3811
|
+
<h2 class="card-title">{{ t('structure.sharedTitle') }}</h2>
|
|
3812
|
+
@for (group of sharedStructureGroups; track group.key) {
|
|
3813
|
+
<div class="control-row">
|
|
3814
|
+
<span class="control-label">{{ t(group.labelKey) }}</span>
|
|
3815
|
+
<div class="segmented">
|
|
3816
|
+
@for (option of group.options; track option.value) {
|
|
3817
|
+
<button
|
|
3818
|
+
type="button"
|
|
3819
|
+
class="seg-btn"
|
|
3820
|
+
[class.active]="form()[group.key] === option.value"
|
|
3821
|
+
(click)="setChoice(group.key, option.value)"
|
|
3822
|
+
>
|
|
3823
|
+
{{ t(option.labelKey) }}
|
|
3824
|
+
</button>
|
|
3825
|
+
}
|
|
3826
|
+
</div>
|
|
3827
|
+
</div>
|
|
3828
|
+
}
|
|
3829
|
+
</section>
|
|
3830
|
+
|
|
3831
|
+
<!-- Movimiento -->
|
|
3832
|
+
<section class="control-card" solReveal [solRevealIndex]="6">
|
|
3833
|
+
<h2 class="card-title">{{ t('motion.title') }}</h2>
|
|
3834
|
+
@for (group of motionGroups; track group.key) {
|
|
3835
|
+
<div class="control-row">
|
|
3836
|
+
<span class="control-label">{{ t(group.labelKey) }}</span>
|
|
3837
|
+
<div class="segmented">
|
|
3838
|
+
@for (option of group.options; track option.value) {
|
|
3839
|
+
<button
|
|
3840
|
+
type="button"
|
|
3841
|
+
class="seg-btn"
|
|
3842
|
+
[class.active]="form()[group.key] === option.value"
|
|
3843
|
+
(click)="setChoice(group.key, option.value)"
|
|
3844
|
+
>
|
|
3845
|
+
{{ t(option.labelKey) }}
|
|
3846
|
+
</button>
|
|
3847
|
+
}
|
|
3848
|
+
</div>
|
|
3849
|
+
</div>
|
|
3850
|
+
}
|
|
3851
|
+
</section>
|
|
3852
|
+
|
|
3853
|
+
<!-- ── Por modo (claro / oscuro) ── -->
|
|
3227
3854
|
<div class="mode-tabs-head">
|
|
3228
3855
|
<p class="group-title">{{ t('group.perMode') }}</p>
|
|
3229
|
-
<div class="mode-tabs" role="tablist">
|
|
3856
|
+
<div class="mode-tabs" role="tablist" data-testid="theme-mode-tabs">
|
|
3230
3857
|
@for (mode of modes; track mode) {
|
|
3231
3858
|
<button
|
|
3232
3859
|
type="button"
|
|
@@ -3243,8 +3870,8 @@ class SolThemeStudioComponent {
|
|
|
3243
3870
|
</div>
|
|
3244
3871
|
</div>
|
|
3245
3872
|
|
|
3246
|
-
@for (section of colorSections(); track section.titleKey) {
|
|
3247
|
-
<section class="control-card">
|
|
3873
|
+
@for (section of colorSections(); track section.titleKey; let i = $index) {
|
|
3874
|
+
<section class="control-card" solReveal [solRevealIndex]="7 + i">
|
|
3248
3875
|
<h2 class="card-title">{{ t(section.titleKey) }}</h2>
|
|
3249
3876
|
@for (field of section.fields; track field.key) {
|
|
3250
3877
|
<div class="control-row">
|
|
@@ -3263,7 +3890,6 @@ class SolThemeStudioComponent {
|
|
|
3263
3890
|
<input
|
|
3264
3891
|
class="swatch-picker"
|
|
3265
3892
|
type="color"
|
|
3266
|
-
[attr.aria-label]="t(field.labelKey)"
|
|
3267
3893
|
[value]="modeForm()[field.key]"
|
|
3268
3894
|
(input)="setModeColor(field.key, inputValue($event))"
|
|
3269
3895
|
/>
|
|
@@ -3271,7 +3897,6 @@ class SolThemeStudioComponent {
|
|
|
3271
3897
|
class="hex-input"
|
|
3272
3898
|
type="text"
|
|
3273
3899
|
maxlength="7"
|
|
3274
|
-
[attr.aria-label]="t(field.labelKey)"
|
|
3275
3900
|
[attr.data-testid]="'hex-' + field.key"
|
|
3276
3901
|
[value]="modeForm()[field.key]"
|
|
3277
3902
|
(change)="onModeHexChange(field.key, $event)"
|
|
@@ -3285,14 +3910,19 @@ class SolThemeStudioComponent {
|
|
|
3285
3910
|
</section>
|
|
3286
3911
|
}
|
|
3287
3912
|
|
|
3288
|
-
<!-- Sombra (por modo) -->
|
|
3289
|
-
<section class="control-card">
|
|
3913
|
+
<!-- Sombra (por modo): estilo + tamaño (compartido) + color + orientación -->
|
|
3914
|
+
<section class="control-card" solReveal [solRevealIndex]="9">
|
|
3290
3915
|
<h2 class="card-title">{{ t('shadow.title') }}</h2>
|
|
3291
3916
|
<div class="control-row">
|
|
3292
3917
|
<span class="control-label">{{ t('shadow.style') }}</span>
|
|
3293
3918
|
<div class="segmented">
|
|
3294
3919
|
@for (option of shadowStyleOptions; track option.value) {
|
|
3295
|
-
<button
|
|
3920
|
+
<button
|
|
3921
|
+
type="button"
|
|
3922
|
+
class="seg-btn"
|
|
3923
|
+
[class.active]="modeForm().shadow === option.value"
|
|
3924
|
+
(click)="setModeChoice('shadow', option.value)"
|
|
3925
|
+
>
|
|
3296
3926
|
{{ t(option.labelKey) }}
|
|
3297
3927
|
</button>
|
|
3298
3928
|
}
|
|
@@ -3302,7 +3932,12 @@ class SolThemeStudioComponent {
|
|
|
3302
3932
|
<span class="control-label">{{ t('shadow.size') }}</span>
|
|
3303
3933
|
<div class="segmented">
|
|
3304
3934
|
@for (option of shadowSizeOptions; track option.value) {
|
|
3305
|
-
<button
|
|
3935
|
+
<button
|
|
3936
|
+
type="button"
|
|
3937
|
+
class="seg-btn"
|
|
3938
|
+
[class.active]="form().shadowSize === option.value"
|
|
3939
|
+
(click)="setChoice('shadowSize', option.value)"
|
|
3940
|
+
>
|
|
3306
3941
|
{{ t(option.labelKey) }}
|
|
3307
3942
|
</button>
|
|
3308
3943
|
}
|
|
@@ -3312,22 +3947,41 @@ class SolThemeStudioComponent {
|
|
|
3312
3947
|
<span class="control-label">{{ t('shadow.color') }}</span>
|
|
3313
3948
|
<div class="swatch-row">
|
|
3314
3949
|
@for (color of shadowColorSuggestions; track color) {
|
|
3315
|
-
<button
|
|
3950
|
+
<button
|
|
3951
|
+
type="button"
|
|
3952
|
+
class="swatch"
|
|
3953
|
+
[class.active]="modeForm().shadowColor === color"
|
|
3954
|
+
[style.background]="color"
|
|
3955
|
+
[attr.aria-label]="color"
|
|
3956
|
+
(click)="setModeColor('shadowColor', color)"
|
|
3957
|
+
></button>
|
|
3316
3958
|
}
|
|
3317
|
-
<input
|
|
3318
|
-
|
|
3959
|
+
<input
|
|
3960
|
+
class="swatch-picker"
|
|
3961
|
+
type="color"
|
|
3962
|
+
[value]="modeForm().shadowColor"
|
|
3963
|
+
(input)="setModeColor('shadowColor', inputValue($event))"
|
|
3964
|
+
/>
|
|
3965
|
+
<input
|
|
3966
|
+
class="hex-input"
|
|
3967
|
+
type="text"
|
|
3968
|
+
maxlength="7"
|
|
3969
|
+
data-testid="hex-shadowColor"
|
|
3970
|
+
[value]="modeForm().shadowColor"
|
|
3971
|
+
(change)="onModeHexChange('shadowColor', $event)"
|
|
3972
|
+
/>
|
|
3319
3973
|
</div>
|
|
3320
3974
|
</div>
|
|
3321
3975
|
<div class="control-row">
|
|
3322
3976
|
<span class="control-label">{{ t('shadow.direction') }}</span>
|
|
3323
|
-
<div class="dir-grid">
|
|
3977
|
+
<div class="dir-grid" data-testid="shadow-direction">
|
|
3324
3978
|
@for (direction of shadowDirections; track direction.value) {
|
|
3325
3979
|
<button
|
|
3326
3980
|
type="button"
|
|
3327
3981
|
class="dir-cell"
|
|
3328
3982
|
[class.active]="modeForm().shadowDirection === direction.value"
|
|
3329
3983
|
[attr.aria-label]="t('shadow.dir.' + direction.value)"
|
|
3330
|
-
[attr.
|
|
3984
|
+
[attr.data-testid]="'dir-' + direction.value"
|
|
3331
3985
|
(click)="setModeChoice('shadowDirection', direction.value)"
|
|
3332
3986
|
>
|
|
3333
3987
|
<span aria-hidden="true">{{ direction.glyph }}</span>
|
|
@@ -3337,14 +3991,19 @@ class SolThemeStudioComponent {
|
|
|
3337
3991
|
</div>
|
|
3338
3992
|
</section>
|
|
3339
3993
|
|
|
3340
|
-
<!-- Textura (por modo) -->
|
|
3341
|
-
<section class="control-card">
|
|
3994
|
+
<!-- Textura de fondo (por modo) -->
|
|
3995
|
+
<section class="control-card" solReveal [solRevealIndex]="10">
|
|
3342
3996
|
<h2 class="card-title">{{ t('texture.title') }}</h2>
|
|
3343
3997
|
<div class="control-row">
|
|
3344
3998
|
<span class="control-label">{{ t('texture.pattern') }}</span>
|
|
3345
3999
|
<div class="segmented">
|
|
3346
4000
|
@for (option of textureOptions; track option.value) {
|
|
3347
|
-
<button
|
|
4001
|
+
<button
|
|
4002
|
+
type="button"
|
|
4003
|
+
class="seg-btn"
|
|
4004
|
+
[class.active]="modeForm().texture === option.value"
|
|
4005
|
+
(click)="setModeChoice('texture', option.value)"
|
|
4006
|
+
>
|
|
3348
4007
|
{{ t(option.labelKey) }}
|
|
3349
4008
|
</button>
|
|
3350
4009
|
}
|
|
@@ -3356,10 +4015,29 @@ class SolThemeStudioComponent {
|
|
|
3356
4015
|
<span class="control-label">{{ t(field.labelKey) }}</span>
|
|
3357
4016
|
<div class="swatch-row">
|
|
3358
4017
|
@for (color of textureColorSuggestions; track color) {
|
|
3359
|
-
<button
|
|
4018
|
+
<button
|
|
4019
|
+
type="button"
|
|
4020
|
+
class="swatch"
|
|
4021
|
+
[class.active]="modeForm()[field.key] === color"
|
|
4022
|
+
[style.background]="color"
|
|
4023
|
+
[attr.aria-label]="color"
|
|
4024
|
+
(click)="setModeColor(field.key, color)"
|
|
4025
|
+
></button>
|
|
3360
4026
|
}
|
|
3361
|
-
<input
|
|
3362
|
-
|
|
4027
|
+
<input
|
|
4028
|
+
class="swatch-picker"
|
|
4029
|
+
type="color"
|
|
4030
|
+
[value]="modeForm()[field.key]"
|
|
4031
|
+
(input)="setModeColor(field.key, inputValue($event))"
|
|
4032
|
+
/>
|
|
4033
|
+
<input
|
|
4034
|
+
class="hex-input"
|
|
4035
|
+
type="text"
|
|
4036
|
+
maxlength="7"
|
|
4037
|
+
[attr.data-testid]="'hex-' + field.key"
|
|
4038
|
+
[value]="modeForm()[field.key]"
|
|
4039
|
+
(change)="onModeHexChange(field.key, $event)"
|
|
4040
|
+
/>
|
|
3363
4041
|
</div>
|
|
3364
4042
|
</div>
|
|
3365
4043
|
}
|
|
@@ -3367,14 +4045,19 @@ class SolThemeStudioComponent {
|
|
|
3367
4045
|
</section>
|
|
3368
4046
|
|
|
3369
4047
|
<!-- Barra lateral y encabezado (por modo) -->
|
|
3370
|
-
<section class="control-card">
|
|
4048
|
+
<section class="control-card" solReveal [solRevealIndex]="11">
|
|
3371
4049
|
<h2 class="card-title">{{ t('structure.modeTitle') }}</h2>
|
|
3372
4050
|
@for (group of modeStructureGroups; track group.key) {
|
|
3373
4051
|
<div class="control-row">
|
|
3374
4052
|
<span class="control-label">{{ t(group.labelKey) }}</span>
|
|
3375
4053
|
<div class="segmented">
|
|
3376
4054
|
@for (option of group.options; track option.value) {
|
|
3377
|
-
<button
|
|
4055
|
+
<button
|
|
4056
|
+
type="button"
|
|
4057
|
+
class="seg-btn"
|
|
4058
|
+
[class.active]="modeForm()[group.key] === option.value"
|
|
4059
|
+
(click)="setModeChoice(group.key, option.value)"
|
|
4060
|
+
>
|
|
3378
4061
|
{{ t(option.labelKey) }}
|
|
3379
4062
|
</button>
|
|
3380
4063
|
}
|
|
@@ -3384,6 +4067,8 @@ class SolThemeStudioComponent {
|
|
|
3384
4067
|
</section>
|
|
3385
4068
|
</div>
|
|
3386
4069
|
|
|
4070
|
+
<!-- Divisor arrastrable (solo escritorio ≥1024px): puntero, flechas, Inicio/Fin; doble
|
|
4071
|
+
clic vuelve al reparto por defecto. -->
|
|
3387
4072
|
<div
|
|
3388
4073
|
class="grid-divider"
|
|
3389
4074
|
role="separator"
|
|
@@ -3400,8 +4085,15 @@ class SolThemeStudioComponent {
|
|
|
3400
4085
|
<span class="grid-divider__handle" aria-hidden="true"></span>
|
|
3401
4086
|
</div>
|
|
3402
4087
|
|
|
4088
|
+
<!-- Vista previa (escritorio): card completo y pegajoso. -->
|
|
3403
4089
|
<aside class="preview-pane">
|
|
3404
|
-
<
|
|
4090
|
+
<div class="preview-toolbar">
|
|
4091
|
+
<h2 class="card-title">{{ t('preview.heading') }}</h2>
|
|
4092
|
+
<button type="button" class="mode-toggle" data-testid="preview-mode-toggle" (click)="toggleMode()">
|
|
4093
|
+
{{ activeMode() === 'dark' ? t('preview.modeDark') : t('preview.modeLight') }}
|
|
4094
|
+
</button>
|
|
4095
|
+
</div>
|
|
4096
|
+
|
|
3405
4097
|
<div class="preview-body">
|
|
3406
4098
|
<sol-theme-studio-preview
|
|
3407
4099
|
data-testid="studio-preview"
|
|
@@ -3410,121 +4102,134 @@ class SolThemeStudioComponent {
|
|
|
3410
4102
|
[brand]="brandForm()"
|
|
3411
4103
|
[tagline]="tagline()"
|
|
3412
4104
|
[tableVariant]="form().tableVariant"
|
|
4105
|
+
[loader]="previewLoader()"
|
|
3413
4106
|
/>
|
|
3414
4107
|
</div>
|
|
3415
|
-
|
|
4108
|
+
|
|
4109
|
+
<div class="preview-actions">
|
|
4110
|
+
<sol-button
|
|
4111
|
+
data-testid="studio-apply"
|
|
4112
|
+
variant="primary"
|
|
4113
|
+
[loading]="applying()"
|
|
4114
|
+
[disabled]="busy()"
|
|
4115
|
+
(clicked)="requestApply()"
|
|
4116
|
+
>
|
|
4117
|
+
{{ t('actions.apply') }}
|
|
4118
|
+
</sol-button>
|
|
4119
|
+
<sol-button data-testid="studio-copy" variant="ghost" (clicked)="copyJson()">
|
|
4120
|
+
<sol-icon name="clipboard" size="sm" />
|
|
4121
|
+
{{ t('actions.copy') }}
|
|
4122
|
+
</sol-button>
|
|
4123
|
+
<sol-button data-testid="studio-export" size="touch" variant="ghost" (clicked)="exportJson()">{{ t('actions.export') }}</sol-button>
|
|
4124
|
+
<sol-button data-testid="studio-import" size="touch" variant="ghost" [loading]="importing()" [disabled]="importing() || applying()" (clicked)="themeJsonInput.click()">{{ t('actions.import') }}</sol-button>
|
|
4125
|
+
<p class="json-file-hint field-hint">{{ t('actions.jsonHint') }}</p>
|
|
4126
|
+
<p class="json-file-hint field-hint" role="status" aria-live="polite" data-testid="studio-json-status">{{ statusText() }}</p>
|
|
4127
|
+
</div>
|
|
3416
4128
|
</aside>
|
|
3417
4129
|
</div>
|
|
3418
4130
|
|
|
4131
|
+
<!-- Botón flotante (bajo 1024px): círculo al borde derecho a media altura. -->
|
|
3419
4132
|
<button
|
|
3420
4133
|
type="button"
|
|
3421
4134
|
class="preview-fab"
|
|
3422
|
-
data-testid="preview-fab"
|
|
4135
|
+
data-testid="preview-fab-mobile"
|
|
3423
4136
|
[attr.aria-label]="t('preview.open')"
|
|
3424
|
-
|
|
4137
|
+
[attr.aria-expanded]="previewOpenMobile()"
|
|
4138
|
+
(click)="previewOpenMobile.set(true)"
|
|
3425
4139
|
>
|
|
3426
4140
|
<sol-icon name="eye" size="md" />
|
|
3427
4141
|
</button>
|
|
3428
4142
|
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
[
|
|
3432
|
-
|
|
3433
|
-
size="lg"
|
|
3434
|
-
(closed)="previewOpenCompact.set(false)"
|
|
3435
|
-
>
|
|
3436
|
-
<ng-container [ngTemplateOutlet]="previewToolbar" />
|
|
3437
|
-
<sol-theme-studio-preview
|
|
3438
|
-
[theme]="effectiveTheme()"
|
|
3439
|
-
[mode]="activeMode()"
|
|
3440
|
-
[brand]="brandForm()"
|
|
3441
|
-
[tagline]="tagline()"
|
|
3442
|
-
[tableVariant]="form().tableVariant"
|
|
3443
|
-
/>
|
|
3444
|
-
<div drawerFooter>
|
|
3445
|
-
<ng-container [ngTemplateOutlet]="previewActions" />
|
|
3446
|
-
</div>
|
|
3447
|
-
</sol-drawer>
|
|
4143
|
+
<!-- Panel lateral de la vista previa (bajo 1024px): el card COMPLETO. -->
|
|
4144
|
+
@if (previewOpenMobile()) {
|
|
4145
|
+
<div class="preview-slide-over" role="dialog" aria-modal="true" [attr.aria-label]="t('preview.heading')">
|
|
4146
|
+
<div class="slide-over-backdrop" (click)="previewOpenMobile.set(false)"></div>
|
|
3448
4147
|
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
4148
|
+
<div class="slide-over-panel">
|
|
4149
|
+
<div class="slide-over-header">
|
|
4150
|
+
<h2 class="card-title">{{ t('preview.heading') }}</h2>
|
|
4151
|
+
<button type="button" class="mode-toggle" data-testid="preview-mode-toggle-mobile" (click)="toggleMode()">
|
|
4152
|
+
{{ activeMode() === 'dark' ? t('preview.modeDark') : t('preview.modeLight') }}
|
|
4153
|
+
</button>
|
|
4154
|
+
<button
|
|
4155
|
+
type="button"
|
|
4156
|
+
class="close-btn"
|
|
4157
|
+
data-testid="preview-slide-close"
|
|
4158
|
+
[attr.aria-label]="t('preview.close')"
|
|
4159
|
+
(click)="previewOpenMobile.set(false)"
|
|
4160
|
+
>
|
|
4161
|
+
<sol-icon name="x" size="md" />
|
|
4162
|
+
</button>
|
|
4163
|
+
</div>
|
|
3465
4164
|
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
4165
|
+
<div class="slide-over-body">
|
|
4166
|
+
<sol-theme-studio-preview
|
|
4167
|
+
data-testid="studio-preview-mobile"
|
|
4168
|
+
[theme]="effectiveTheme()"
|
|
4169
|
+
[mode]="activeMode()"
|
|
4170
|
+
[brand]="brandForm()"
|
|
4171
|
+
[tagline]="tagline()"
|
|
4172
|
+
[tableVariant]="form().tableVariant"
|
|
4173
|
+
[loader]="previewLoader()"
|
|
4174
|
+
/>
|
|
4175
|
+
</div>
|
|
3475
4176
|
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
>
|
|
3497
|
-
<sol-icon name="cloud-arrow-up" size="sm" />
|
|
3498
|
-
{{ t('actions.import') }}
|
|
3499
|
-
</sol-button>
|
|
3500
|
-
<p class="field-hint json-hint">{{ t('actions.jsonHint') }}</p>
|
|
3501
|
-
@if (status(); as current) {
|
|
3502
|
-
<p class="field-hint json-hint" role="status" aria-live="polite" data-testid="studio-status">
|
|
3503
|
-
{{ t(current.key, current.params) }}
|
|
3504
|
-
</p>
|
|
3505
|
-
}
|
|
4177
|
+
<div class="slide-over-footer preview-actions">
|
|
4178
|
+
<sol-button
|
|
4179
|
+
data-testid="studio-apply-mobile"
|
|
4180
|
+
variant="primary"
|
|
4181
|
+
[loading]="applying()"
|
|
4182
|
+
[disabled]="busy()"
|
|
4183
|
+
(clicked)="requestApply()"
|
|
4184
|
+
>
|
|
4185
|
+
{{ t('actions.apply') }}
|
|
4186
|
+
</sol-button>
|
|
4187
|
+
<sol-button data-testid="studio-copy-mobile" variant="ghost" (clicked)="copyJson()">
|
|
4188
|
+
<sol-icon name="clipboard" size="sm" />
|
|
4189
|
+
{{ t('actions.copy') }}
|
|
4190
|
+
</sol-button>
|
|
4191
|
+
<sol-button data-testid="studio-export-mobile" size="touch" variant="ghost" (clicked)="exportJson()">{{ t('actions.export') }}</sol-button>
|
|
4192
|
+
<sol-button data-testid="studio-import-mobile" size="touch" variant="ghost" [loading]="importing()" [disabled]="importing() || applying()" (clicked)="themeJsonInput.click()">{{ t('actions.import') }}</sol-button>
|
|
4193
|
+
<p class="json-file-hint field-hint">{{ t('actions.jsonHint') }}</p>
|
|
4194
|
+
<p class="json-file-hint field-hint" role="status" aria-live="polite" data-testid="studio-json-status-mobile">{{ statusText() }}</p>
|
|
4195
|
+
</div>
|
|
4196
|
+
</div>
|
|
3506
4197
|
</div>
|
|
3507
|
-
|
|
4198
|
+
}
|
|
4199
|
+
|
|
4200
|
+
<sol-confirm-dialog
|
|
4201
|
+
[open]="showApplyConfirm()"
|
|
4202
|
+
[title]="t('confirm.title')"
|
|
4203
|
+
[message]="t('confirm.message')"
|
|
4204
|
+
[confirmLabel]="t('confirm.confirm')"
|
|
4205
|
+
[cancelLabel]="t('confirm.cancel')"
|
|
4206
|
+
variant="warning"
|
|
4207
|
+
(confirm)="confirmApply()"
|
|
4208
|
+
(cancel)="showApplyConfirm.set(false)"
|
|
4209
|
+
/>
|
|
3508
4210
|
}
|
|
3509
4211
|
}
|
|
3510
4212
|
</div>
|
|
3511
|
-
`, isInline: true, styles: [":host{display:block;color:var(--sol-color-text-primary, #0F172A)}.studio{display:flex;flex-direction:column;gap:var(--sol-space-md, 16px);min-width:0;padding-bottom:var(--sol-space-xl, 32px)}.studio-title,.card-title{margin:0;font-family:var(--sol-font-display, var(--sol-font-family, system-ui, sans-serif));font-weight:var(--sol-display-weight, 700);letter-spacing:var(--sol-display-tracking, 0em);text-transform:var(--sol-display-transform, none);color:var(--sol-color-text-primary, #0F172A)}.studio-title{font-size:var(--sol-font-size-xl, 20px)}.card-title{font-size:var(--sol-font-size-lg, 16px)}.studio-subtitle{margin:var(--sol-space-xs, 4px) 0 0;font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-secondary, #475569)}.state-panel{display:flex;flex-direction:column;align-items:center;gap:var(--sol-space-sm, 8px);padding:var(--sol-space-xl, 32px) var(--sol-space-md, 16px);text-align:center;background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);color:var(--sol-color-text-secondary, #475569)}.state-panel p{margin:0}.state-panel--error{color:var(--sol-color-danger, #DC2626)}.notice{margin:0;padding:var(--sol-space-sm, 8px) var(--sol-space-md, 12px);border-radius:var(--sol-border-radius-md, 8px);background:color-mix(in srgb,var(--sol-color-info, #0284C7) 10%,transparent);color:var(--sol-color-text-primary, #0F172A);font-size:var(--sol-font-size-sm, 13px)}.inline-error{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sol-space-sm, 8px);color:var(--sol-color-danger, #DC2626);font-size:var(--sol-font-size-sm, 13px)}.history-panel{display:flex;flex-direction:column;align-items:flex-start;gap:var(--sol-space-sm, 8px)}.history-list{width:100%;margin:0;padding:0;list-style:none}.history-list li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--sol-space-md, 16px);padding-block:var(--sol-space-sm, 8px);border-bottom:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0)}.studio-grid{--studio-split: 60%;display:grid;grid-template-columns:minmax(0,1fr);gap:var(--sol-space-lg, 24px);align-items:start}.studio-grid.is-resizing{cursor:col-resize;-webkit-user-select:none;user-select:none}.controls{display:flex;flex-direction:column;gap:var(--sol-space-md, 16px);min-width:0}.group-title{margin:var(--sol-space-sm, 8px) 0 0;font-size:var(--sol-font-size-sm, 13px);font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--sol-color-text-muted, #64748B)}.control-card{display:flex;flex-direction:column;gap:var(--sol-space-md, 16px);padding:var(--sol-space-lg, 24px);background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);box-shadow:var(--sol-card-shadow, none)}.control-row{display:flex;flex-direction:column;gap:var(--sol-space-sm, 8px);min-width:0}.control-label{display:flex;justify-content:space-between;align-items:baseline;gap:var(--sol-space-sm, 8px);font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-secondary, #475569)}.range-value{font-family:var(--sol-font-numeric, var(--sol-font-family, system-ui, sans-serif));color:var(--sol-color-text-primary, #0F172A)}.swatch-row,.font-list{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sol-space-sm, 8px)}.field-hint{margin:0;font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-muted, #64748B)}.logo-thumb{width:40px;height:40px;object-fit:contain;border-radius:var(--sol-border-radius-sm, 6px);border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);background:var(--sol-bg-sunken, #F1F5F9)}.swatch{width:28px;height:28px;padding:0;border-radius:var(--sol-border-radius-full, 999px);border:2px solid var(--sol-border-color-default, #E2E8F0);cursor:pointer}.swatch.active{border-color:var(--sol-color-primary, #2563EB);box-shadow:0 0 0 2px color-mix(in srgb,var(--sol-color-primary, #2563EB) 35%,transparent)}.swatch-picker{width:32px;height:28px;padding:0;background:transparent;border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);border-radius:var(--sol-border-radius-sm, 6px);cursor:pointer}.hex-input,.text-input,.font-select{background:var(--sol-input-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-input-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-input-radius, 6px);box-shadow:var(--sol-input-shadow, none);color:var(--sol-color-text-primary, #0F172A);outline:none}.hex-input{width:96px;height:32px;padding:0 var(--sol-space-sm, 8px);font-family:var(--sol-font-family-mono, ui-monospace, monospace);font-size:var(--sol-font-size-sm, 13px);text-transform:uppercase}.text-input,.font-select{width:100%;height:var(--sol-size-input-height, 36px);padding:0 var(--sol-space-sm, 10px);font:inherit}.font-select{max-width:280px;cursor:pointer}.hex-input:focus,.text-input:focus,.font-select:focus{border:var(--sol-input-focus-border, 1px solid var(--sol-color-primary, #2563EB));box-shadow:var(--sol-input-focus-ring, none)}.font-btn{padding:var(--sol-space-sm, 8px) var(--sol-space-md, 12px);font-size:var(--sol-font-size-base, 14px);background:var(--sol-bg-sunken, #F1F5F9);color:var(--sol-color-text-primary, #0F172A);border:var(--sol-border-width-default, 1px) solid transparent;border-radius:var(--sol-border-radius-md, 8px);cursor:pointer}.font-btn.active{border-color:var(--sol-color-primary, #2563EB);background:color-mix(in srgb,var(--sol-color-primary, #2563EB) 8%,transparent)}.segmented,.mode-tabs,.dir-grid{padding:3px;background:var(--sol-bg-sunken, #F1F5F9);border-radius:var(--sol-border-radius-md, 8px)}.segmented{display:flex;flex-wrap:wrap;gap:var(--sol-space-xs, 4px);width:fit-content;max-width:100%}.seg-btn,.mode-tab,.mode-toggle{min-height:32px;font-family:inherit;font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-secondary, #475569);background:transparent;border:none;border-radius:var(--sol-border-radius-md, 8px);cursor:pointer;transition:background var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.seg-btn{padding:5px 11px}.seg-btn.active,.mode-tab.active{background:var(--sol-bg-surface, #FFFFFF);color:var(--sol-color-primary, #2563EB);box-shadow:var(--sol-shadow-sm, none);font-weight:600}.seg-btn:focus-visible,.mode-tab:focus-visible,.swatch:focus-visible,.dir-cell:focus-visible,.font-btn:focus-visible,.mode-toggle:focus-visible{outline:2px solid var(--sol-color-primary, #2563EB);outline-offset:2px}.range{width:100%;accent-color:var(--sol-color-primary, #2563EB)}.mode-tabs-head{display:flex;flex-direction:column;gap:var(--sol-space-sm, 8px)}.mode-tabs{display:flex;gap:var(--sol-space-xs, 4px);border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0))}.mode-tab{flex:1;padding:7px 12px}.dir-grid{display:grid;grid-template-columns:repeat(3,32px);grid-auto-rows:32px;gap:var(--sol-space-xs, 4px);width:fit-content}.dir-cell{display:flex;align-items:center;justify-content:center;font-size:var(--sol-font-size-base, 14px);color:var(--sol-color-text-secondary, #475569);background:transparent;border:var(--sol-border-width-default, 1px) solid transparent;border-radius:var(--sol-border-radius-sm, 6px);cursor:pointer}.dir-cell.active{background:var(--sol-bg-surface, #FFFFFF);color:var(--sol-color-primary, #2563EB);border-color:var(--sol-color-primary, #2563EB);font-weight:700}.grid-divider{display:none;position:relative;align-self:stretch;width:var(--sol-space-lg, 24px);cursor:col-resize;touch-action:none;-webkit-user-select:none;user-select:none;outline:none}.grid-divider:before{content:\"\";position:absolute;top:0;bottom:0;left:50%;width:var(--sol-border-width-default, 1px);transform:translate(-50%);background:var(--sol-border-color-default, #E2E8F0)}.grid-divider__handle{position:sticky;top:calc(50dvh - var(--sol-space-lg, 24px));display:block;width:var(--sol-space-xs, 4px);height:calc(var(--sol-space-lg, 24px) * 2);margin:0 auto;border-radius:var(--sol-border-radius-full, 999px);background:var(--sol-color-text-muted, #64748B)}.grid-divider:hover .grid-divider__handle,.grid-divider:focus-visible .grid-divider__handle,.studio-grid.is-resizing .grid-divider__handle{background:var(--sol-color-primary, #2563EB)}.preview-pane{display:none;position:sticky;top:calc(var(--sol-size-header-height, 56px) + var(--sol-space-md, 16px));max-height:calc(100dvh - var(--sol-size-header-height, 56px) - var(--sol-space-xl, 32px));flex-direction:column;gap:var(--sol-space-sm, 8px);min-width:0;min-height:0;overflow:hidden;padding:var(--sol-space-md, 16px);background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);box-shadow:var(--sol-card-shadow, none)}.preview-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}.preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--sol-space-sm, 8px);margin-bottom:var(--sol-space-sm, 8px)}.mode-toggle{display:inline-flex;align-items:center;gap:var(--sol-space-xs, 4px);padding:5px 11px;background:var(--sol-bg-sunken, #F1F5F9);border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);border-radius:var(--sol-border-radius-full, 999px);white-space:nowrap}.preview-actions{display:flex;flex-wrap:wrap;gap:var(--sol-space-sm, 8px);padding-top:var(--sol-space-sm, 8px);border-top:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0)}.json-hint{flex-basis:100%}.preview-fab{position:fixed;right:var(--sol-space-sm, 8px);top:50%;z-index:calc(var(--sol-z-dropdown, 100) + 10);display:flex;align-items:center;justify-content:center;width:calc(var(--sol-size-control-touch, 44px) + var(--sol-space-sm, 8px));height:calc(var(--sol-size-control-touch, 44px) + var(--sol-space-sm, 8px));transform:translateY(-50%);border:none;border-radius:var(--sol-border-radius-full, 999px);background:var(--sol-color-primary, #2563EB);color:var(--sol-color-primary-contrast, #FFFFFF);box-shadow:var(--sol-shadow-lg, none);cursor:pointer}.preview-fab:focus-visible{outline:3px solid color-mix(in srgb,var(--sol-color-primary, #2563EB) 45%,transparent);outline-offset:2px}.confirm-message{margin:0 0 var(--sol-space-md, 16px);color:var(--sol-color-text-secondary, #475569)}.confirm-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--sol-space-sm, 8px)}@media(max-width:767px){.control-card{padding:var(--sol-space-md, 16px)}.seg-btn,.mode-tab,.mode-toggle,.swatch,.dir-cell{min-height:var(--sol-size-control-touch, 44px)}.swatch{min-width:var(--sol-size-control-touch, 44px)}.text-input,.hex-input,.font-select{font-size:var(--sol-font-size-touch-input, 16px)}}@media(min-width:1024px){.studio-grid{grid-template-columns:minmax(0,var(--studio-split)) var(--sol-space-lg, 24px) minmax(0,1fr);gap:0}.grid-divider{display:block}.preview-pane{display:flex}.preview-fab{display:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SolButtonComponent, selector: "sol-button", inputs: ["variant", "size", "disabled", "type", "loading"], outputs: ["clicked"] }, { kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }, { kind: "component", type: SolModalComponent, selector: "sol-modal", inputs: ["open", "title", "size", "closeable", "closeOnBackdrop"], outputs: ["closed"] }, { kind: "component", type: SolDrawerComponent, selector: "sol-drawer", inputs: ["open", "title", "side", "size", "variant", "closeable", "closeOnBackdrop"], outputs: ["closed"] }, { kind: "component", type: SolSpinnerComponent, selector: "sol-spinner", inputs: ["size", "color"] }, { kind: "component", type: SolThemeStudioPreviewComponent, selector: "sol-theme-studio-preview", inputs: ["theme", "mode", "brand", "tagline", "tableVariant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4213
|
+
`, isInline: true, styles: [":host{display:block}.studio{display:flex;flex-direction:column;gap:var(--sol-space-md, 16px);padding-bottom:var(--sol-space-xl, 32px);min-width:0}.studio-title,.card-title{margin:0;font-family:var(--sol-font-display, var(--sol-font-family, system-ui, sans-serif));font-weight:var(--sol-display-weight, 700);letter-spacing:var(--sol-display-tracking, 0em);text-transform:var(--sol-display-transform, none);color:var(--sol-color-text-primary, #0F172A)}.studio-title{font-size:var(--sol-font-size-xl, 20px)}.studio-subtitle{margin:4px 0 0;color:var(--sol-color-text-secondary, #475569);font-size:var(--sol-font-size-sm, 13px)}.state-panel{display:flex;flex-direction:column;align-items:center;gap:var(--sol-space-sm, 8px);padding:var(--sol-space-xl, 32px) var(--sol-space-md, 16px);text-align:center;background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);color:var(--sol-color-text-secondary, #475569)}.state-panel p{margin:0}.state-panel--error{color:var(--sol-color-danger, #DC2626)}.notice{margin:0;padding:var(--sol-space-sm, 8px) var(--sol-space-md, 12px);border-radius:var(--sol-border-radius-md, 8px);background:color-mix(in srgb,var(--sol-color-info, #0284C7) 10%,transparent);color:var(--sol-color-text-primary, #0F172A);font-size:var(--sol-font-size-sm, 13px)}.studio-grid{--studio-split: 60%;--studio-sticky-top: calc(var(--sol-size-header-height, 56px) + var(--sol-space-md, 16px));display:grid;grid-template-columns:minmax(0,1fr);gap:var(--sol-space-lg, 24px);align-items:start}.studio-grid.is-resizing{cursor:col-resize;user-select:none;-webkit-user-select:none}.controls{display:flex;flex-direction:column;gap:var(--sol-space-md, 16px);min-width:0}.grid-divider{display:none;position:relative;align-self:stretch;width:var(--sol-space-lg, 24px);cursor:col-resize;touch-action:none;user-select:none;-webkit-user-select:none;outline:none}.grid-divider:before{content:\"\";position:absolute;top:0;bottom:0;left:50%;width:var(--sol-border-width-default, 1px);transform:translate(-50%);background:var(--sol-border-color-default, #E2E8F0)}.grid-divider__handle{position:sticky;top:calc(50dvh - var(--sol-space-lg, 24px));display:block;width:var(--sol-space-xs, 4px);height:calc(var(--sol-space-lg, 24px) * 2);margin:0 auto;border-radius:var(--sol-border-radius-full, 999px);background:var(--sol-color-text-muted, #64748B);transition:background var(--sol-dur-fast, .12s) var(--sol-ease, ease),transform var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.grid-divider:hover .grid-divider__handle,.grid-divider:focus-visible .grid-divider__handle,.studio-grid.is-resizing .grid-divider__handle{background:var(--sol-color-primary, #2563EB);transform:scaleX(1.5)}.grid-divider:focus-visible .grid-divider__handle{box-shadow:0 0 0 3px color-mix(in srgb,var(--sol-color-primary, #2563EB) 30%,transparent)}.group-title{margin:var(--sol-space-sm, 8px) 0 0;font-size:var(--sol-font-size-sm, 13px);font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--sol-color-text-muted, #64748B)}.control-card{display:flex;flex-direction:column;gap:var(--sol-space-md, 16px);padding:var(--sol-space-lg, 24px);background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);box-shadow:var(--sol-card-shadow, none)}.card-title{font-size:var(--sol-font-size-lg, 16px)}.control-row{display:flex;flex-direction:column;gap:7px;min-width:0}.control-label{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-secondary, #475569)}.range-value{font-family:var(--sol-font-numeric, var(--sol-font-family, system-ui, sans-serif));color:var(--sol-color-text-primary, #0F172A)}.swatch-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.field-hint{margin:0;font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-muted, #64748B)}.logo-thumb{width:40px;height:40px;object-fit:contain;border-radius:var(--sol-border-radius-sm, 6px);border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #e5e7eb);background:var(--sol-bg-sunken, #f8fafc)}.swatch{width:26px;height:26px;border-radius:50%;border:2px solid var(--sol-border-color-default, #E2E8F0);cursor:pointer;padding:0}.swatch.active{border-color:var(--sol-color-primary, #2563EB);box-shadow:0 0 0 2px color-mix(in srgb,var(--sol-color-primary, #2563EB) 35%,transparent)}.swatch-picker{width:30px;height:26px;padding:0;border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);border-radius:var(--sol-border-radius-sm, 6px);background:transparent;cursor:pointer}.hex-input,.text-input{background:var(--sol-input-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-input-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-input-radius, 6px);box-shadow:var(--sol-input-shadow, none);color:var(--sol-color-text-primary, #0F172A);outline:none}.hex-input{width:92px;height:28px;padding:0 8px;font-family:var(--sol-font-family-mono, ui-monospace, monospace);font-size:var(--sol-font-size-sm, 13px);text-transform:uppercase}.text-input{width:100%;height:var(--sol-size-input-height, 36px);padding:0 10px;font:inherit}.hex-input:focus,.text-input:focus{border:var(--sol-input-focus-border, 1px solid var(--sol-color-primary, #2563EB));box-shadow:var(--sol-input-focus-ring, none)}.font-list{display:flex;gap:8px;flex-wrap:wrap}.font-btn{padding:8px 12px;font-size:15px;background:var(--sol-bg-sunken, #F1F5F9);color:var(--sol-color-text-primary, #0F172A);border:var(--sol-border-width-default, 1px) solid transparent;border-radius:var(--sol-border-radius-md, 8px);cursor:pointer}.font-btn.active{border-color:var(--sol-color-primary, #2563EB);background:color-mix(in srgb,var(--sol-color-primary, #2563EB) 8%,transparent)}.font-select{width:100%;max-width:280px;height:var(--sol-size-input-height, 36px);padding:0 10px;background:var(--sol-input-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-input-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-input-radius, 6px);box-shadow:var(--sol-input-shadow, none);color:var(--sol-color-text-primary, #0F172A);font-size:var(--sol-font-size-sm, 13px);outline:none;cursor:pointer}.font-select:focus{border:var(--sol-input-focus-border, 1px solid var(--sol-color-primary, #2563EB));box-shadow:var(--sol-input-focus-ring, none)}.segmented{display:flex;gap:4px;flex-wrap:wrap;padding:3px;background:var(--sol-bg-sunken, #F1F5F9);border-radius:var(--sol-border-radius-md, 8px);width:fit-content;max-width:100%}.seg-btn,.mode-tab{font-size:var(--sol-font-size-sm, 13px);font-family:inherit;background:transparent;color:var(--sol-color-text-secondary, #475569);border:none;border-radius:calc(var(--sol-border-radius-md, 8px) - 2px);cursor:pointer;transition:background var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.seg-btn.active,.mode-tab.active{background:var(--sol-bg-surface, #FFFFFF);color:var(--sol-color-primary, #2563EB);box-shadow:var(--sol-shadow-sm, none);font-weight:600}.seg-btn{padding:5px 11px}.seg-btn:focus-visible,.mode-tab:focus-visible,.swatch:focus-visible,.dir-cell:focus-visible,.font-btn:focus-visible,.mode-toggle:focus-visible{outline:2px solid var(--sol-color-primary, #2563EB);outline-offset:2px}.range{width:100%;accent-color:var(--sol-color-primary, #2563EB)}.mode-tabs-head{display:flex;flex-direction:column;gap:8px}.mode-tabs{display:flex;gap:4px;padding:3px;background:var(--sol-bg-sunken, #F1F5F9);border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-border-radius-md, 8px)}.mode-tab{flex:1;padding:7px 12px}.dir-grid{display:grid;grid-template-columns:repeat(3,30px);grid-auto-rows:30px;gap:4px;width:fit-content;padding:3px;background:var(--sol-bg-sunken, #F1F5F9);border-radius:var(--sol-border-radius-md, 8px)}.dir-cell{display:flex;align-items:center;justify-content:center;font-size:14px;line-height:1;background:transparent;color:var(--sol-color-text-secondary, #475569);border:var(--sol-border-width-default, 1px) solid transparent;border-radius:var(--sol-border-radius-sm, 6px);cursor:pointer;transition:background var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.dir-cell.active{background:var(--sol-bg-surface, #FFFFFF);color:var(--sol-color-primary, #2563EB);border-color:var(--sol-color-primary, #2563EB);font-weight:700}.history-panel{padding:var(--sol-space-4, 16px)}.history-list{list-style:none;padding:var(--sol-space-0, 0px)}.history-list li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--sol-space-4, 16px);padding-block:var(--sol-space-2, 8px)}.preview-pane{display:none;position:sticky;top:var(--studio-sticky-top);max-height:calc(100dvh - var(--studio-sticky-top) - var(--sol-theme-studio-bottom-inset, 0px) - var(--sol-space-md, 16px));flex-direction:column;gap:var(--sol-space-sm, 8px);padding:var(--sol-space-md, 16px);background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);box-shadow:var(--sol-card-shadow, none);min-width:0;min-height:0;overflow:hidden}.preview-toolbar{flex:0 0 auto;display:flex;justify-content:space-between;align-items:center;gap:var(--sol-space-sm, 8px)}.preview-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}.mode-toggle{padding:5px 11px;font-size:var(--sol-font-size-sm, 13px);font-family:inherit;background:var(--sol-bg-sunken, #F1F5F9);color:var(--sol-color-text-secondary, #475569);border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);border-radius:var(--sol-border-radius-full, 999px);cursor:pointer;white-space:nowrap}.json-file-hint{flex-basis:100%}.preview-actions{flex:0 0 auto;display:flex;gap:var(--sol-space-sm, 8px);flex-wrap:wrap;padding-top:var(--sol-space-sm, 8px);border-top:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0)}.studio-header{display:flex;justify-content:space-between;align-items:center}.preview-fab{position:fixed;right:var(--sol-space-sm, 8px);top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:calc(var(--sol-size-control-touch, 44px) + var(--sol-space-sm, 8px));height:calc(var(--sol-size-control-touch, 44px) + var(--sol-space-sm, 8px));border:none;border-radius:var(--sol-border-radius-full, 999px);background:var(--sol-color-primary, #2563EB);color:var(--sol-color-primary-contrast, #FFFFFF);cursor:pointer;z-index:calc(var(--sol-z-dropdown, 100) + 10);box-shadow:var(--sol-shadow-lg, none),0 0 0 4px color-mix(in srgb,var(--sol-color-primary, #2563EB) 25%,transparent);transition:transform var(--sol-dur-fast, .12s) var(--sol-ease, ease),box-shadow var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.preview-fab:active{transform:translateY(-50%) scale(.94)}.preview-fab:focus-visible{outline:none;box-shadow:var(--sol-shadow-lg, none),0 0 0 4px color-mix(in srgb,var(--sol-color-primary, #2563EB) 45%,transparent)}.preview-slide-over{position:fixed;inset:0;z-index:var(--sol-z-modal, 1000)}.slide-over-backdrop{position:absolute;inset:0;background:var(--sol-bg-overlay, rgba(0, 0, 0, .5));backdrop-filter:var(--sol-overlay-blur, blur(3px));-webkit-backdrop-filter:var(--sol-overlay-blur, blur(3px));animation:studioFadeIn var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.slide-over-panel{position:absolute;top:0;right:0;bottom:0;width:min(100vw,520px);display:flex;flex-direction:column;min-height:0;background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));box-shadow:var(--sol-shadow-lg, none);animation:studioSlideIn var(--sol-dur-normal) var(--sol-ease, ease)}@keyframes studioSlideIn{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes studioFadeIn{0%{opacity:0}to{opacity:1}}.slide-over-header{flex:0 0 auto;display:flex;align-items:center;gap:var(--sol-space-sm, 8px);padding:var(--sol-space-md, 16px);padding-top:calc(var(--sol-space-md, 16px) + env(safe-area-inset-top,0px));border-bottom:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0)}.slide-over-header .card-title{flex:1 1 auto;min-width:0;font-size:var(--sol-font-size-lg, 16px)}.slide-over-header .mode-toggle,.close-btn{min-height:var(--sol-size-control-touch, 44px)}.close-btn{display:flex;align-items:center;justify-content:center;min-width:var(--sol-size-control-touch, 44px);padding:0;background:transparent;border:none;border-radius:var(--sol-border-radius-md, 8px);color:var(--sol-color-text-secondary, #475569);cursor:pointer;transition:background var(--sol-dur-fast, .12s) var(--sol-ease, ease),color var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.close-btn:hover{background:var(--sol-bg-sunken, #F1F5F9);color:var(--sol-color-text-primary, #0F172A)}.slide-over-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:var(--sol-space-md, 16px)}.slide-over-footer{flex:0 0 auto;display:flex;gap:var(--sol-space-sm, 8px);flex-wrap:wrap;padding:var(--sol-space-md, 16px);padding-bottom:calc(var(--sol-space-md, 16px) + env(safe-area-inset-bottom,0px));border-top:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);background:var(--sol-bg-sunken, #F1F5F9)}@media(min-width:1024px){.studio-grid{grid-template-columns:minmax(0,var(--studio-split)) var(--sol-space-lg, 24px) minmax(0,1fr);gap:0}.grid-divider{display:block}.preview-pane{display:flex}.preview-fab,.preview-slide-over{display:none}}@media(prefers-reduced-motion:reduce){.slide-over-backdrop,.slide-over-panel{animation:none}}\n"], dependencies: [{ kind: "component", type: SolButtonComponent, selector: "sol-button", inputs: ["variant", "size", "disabled", "type", "loading"], outputs: ["clicked"] }, { kind: "component", type: SolIconComponent, selector: "sol-icon", inputs: ["name", "size", "variant"] }, { kind: "component", type: SolConfirmDialogComponent, selector: "sol-confirm-dialog", inputs: ["open", "title", "message", "confirmLabel", "cancelLabel", "variant"], outputs: ["confirm", "cancel"] }, { kind: "directive", type: SolRevealDirective, selector: "[solReveal]", inputs: ["solRevealIndex", "solRevealReplay"] }, { kind: "component", type: SolSpinnerComponent, selector: "sol-spinner", inputs: ["size", "color"] }, { kind: "component", type: SolThemeStudioPreviewComponent, selector: "sol-theme-studio-preview", inputs: ["theme", "mode", "brand", "tagline", "tableVariant", "loader"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3512
4214
|
}
|
|
3513
4215
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SolThemeStudioComponent, decorators: [{
|
|
3514
4216
|
type: Component,
|
|
3515
|
-
args: [{ selector: 'sol-theme-studio', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3516
|
-
|
|
4217
|
+
args: [{ selector: 'sol-theme-studio', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
4218
|
+
'(document:keydown.escape)': 'closePreviewPanel()',
|
|
4219
|
+
}, imports: [
|
|
3517
4220
|
SolButtonComponent,
|
|
3518
4221
|
SolIconComponent,
|
|
3519
|
-
|
|
3520
|
-
|
|
4222
|
+
SolConfirmDialogComponent,
|
|
4223
|
+
SolRevealDirective,
|
|
3521
4224
|
SolSpinnerComponent,
|
|
3522
4225
|
SolThemeStudioPreviewComponent,
|
|
3523
4226
|
], template: `
|
|
3524
4227
|
<div class="studio">
|
|
3525
4228
|
<header class="studio-header">
|
|
3526
|
-
<
|
|
3527
|
-
|
|
4229
|
+
<div>
|
|
4230
|
+
<h1 class="studio-title">{{ t('title') }}</h1>
|
|
4231
|
+
<p class="studio-subtitle">{{ t('subtitle') }}</p>
|
|
4232
|
+
</div>
|
|
3528
4233
|
</header>
|
|
3529
4234
|
|
|
3530
4235
|
@switch (loadState()) {
|
|
@@ -3555,42 +4260,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3555
4260
|
}
|
|
3556
4261
|
|
|
3557
4262
|
@if (canBrowseHistory) {
|
|
3558
|
-
<section class="history-panel" data-testid="studio-history-panel">
|
|
4263
|
+
<section class="history-panel" data-testid="studio-history-panel" [attr.aria-label]="t('history.ariaLabel')">
|
|
3559
4264
|
<sol-button
|
|
3560
4265
|
data-testid="studio-history"
|
|
3561
4266
|
size="touch"
|
|
3562
4267
|
variant="secondary"
|
|
3563
4268
|
[attr.aria-expanded]="historyOpen()"
|
|
3564
4269
|
(clicked)="toggleHistory()"
|
|
3565
|
-
>
|
|
3566
|
-
<sol-icon name="clock" size="sm" />
|
|
3567
|
-
{{ t('history.toggle') }}
|
|
3568
|
-
</sol-button>
|
|
4270
|
+
>{{ t('history.toggle') }}</sol-button>
|
|
3569
4271
|
@if (historyOpen()) {
|
|
3570
4272
|
<p class="field-hint">{{ t('history.hint') }}</p>
|
|
3571
|
-
@if (historyLoading()) {
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
<div class="inline-error" role="alert" data-testid="history-error">
|
|
3576
|
-
<span>{{ t(errorKey) }}</span>
|
|
3577
|
-
<sol-button size="touch" variant="ghost" (clicked)="loadHistory()">{{ t('history.retry') }}</sol-button>
|
|
3578
|
-
</div>
|
|
4273
|
+
@if (historyLoading()) { <p role="status" data-testid="history-loading">{{ t('history.loading') }}</p> }
|
|
4274
|
+
@if (historyError(); as error) {
|
|
4275
|
+
<p role="alert" data-testid="history-error">{{ text(error) }}</p>
|
|
4276
|
+
<sol-button data-testid="history-retry" size="touch" variant="ghost" (clicked)="loadHistory()">{{ t('history.retry') }}</sol-button>
|
|
3579
4277
|
}
|
|
3580
4278
|
@if (!historyLoading() && !historyError() && versions().length === 0) {
|
|
3581
|
-
<p
|
|
4279
|
+
<p data-testid="history-empty">{{ t('history.empty') }}</p>
|
|
3582
4280
|
}
|
|
3583
4281
|
<ul class="history-list" data-testid="history-list">
|
|
3584
4282
|
@for (version of versions(); track version.id) {
|
|
3585
4283
|
<li>
|
|
3586
|
-
<div>
|
|
3587
|
-
<
|
|
3588
|
-
|
|
3589
|
-
<p class="field-hint">
|
|
3590
|
-
{{ version.initialCapture ? t('history.initialCapture') : (version.userName ?? t('history.unknownUser')) }}
|
|
3591
|
-
@if (version.sourceVersionId !== null) {
|
|
3592
|
-
· {{ t('history.basedOn', { id: version.sourceVersionId }) }}
|
|
3593
|
-
}
|
|
4284
|
+
<div><strong>{{ t('history.version', { id: version.id }) }}</strong> · {{ versionDate(version.appliedAt) }}
|
|
4285
|
+
<p class="field-hint">{{ version.initialCapture ? t('history.initialCapture') : (version.userName ?? '') }}
|
|
4286
|
+
@if (version.sourceVersionId) { · {{ t('history.basedOn', { id: version.sourceVersionId }) }} }
|
|
3594
4287
|
</p>
|
|
3595
4288
|
</div>
|
|
3596
4289
|
<sol-button
|
|
@@ -3599,93 +4292,134 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3599
4292
|
[attr.data-testid]="'history-preview-' + version.id"
|
|
3600
4293
|
[disabled]="busy()"
|
|
3601
4294
|
(clicked)="previewVersion(version.id)"
|
|
3602
|
-
>
|
|
3603
|
-
{{ t('history.preview') }}
|
|
3604
|
-
</sol-button>
|
|
4295
|
+
>{{ t('history.preview') }}</sol-button>
|
|
3605
4296
|
</li>
|
|
3606
4297
|
}
|
|
3607
4298
|
</ul>
|
|
3608
|
-
@if (versionLoading()) {
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
@if (nextCursor() !== null && !historyLoading()) {
|
|
3612
|
-
<sol-button data-testid="history-more" size="touch" variant="ghost" (clicked)="loadHistory(true)">
|
|
3613
|
-
{{ t('history.loadMore') }}
|
|
3614
|
-
</sol-button>
|
|
4299
|
+
@if (versionLoading()) { <p role="status" data-testid="history-version-loading">{{ t('history.versionLoading') }}</p> }
|
|
4300
|
+
@if (nextCursor() && !historyLoading()) {
|
|
4301
|
+
<sol-button data-testid="history-more" size="touch" variant="ghost" (clicked)="loadHistory(true)">{{ t('history.loadMore') }}</sol-button>
|
|
3615
4302
|
}
|
|
3616
4303
|
}
|
|
3617
4304
|
</section>
|
|
3618
4305
|
}
|
|
4306
|
+
<input #themeJsonInput type="file" hidden accept=".json,application/json" data-testid="studio-json-file" (change)="importJson($event)" />
|
|
3619
4307
|
|
|
3620
|
-
<
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
/>
|
|
3628
|
-
|
|
3629
|
-
<div class="studio-grid" #gridContainer [class.is-resizing]="resizing()" [style.--studio-split]="studioSplit() + '%'">
|
|
4308
|
+
<div
|
|
4309
|
+
class="studio-grid"
|
|
4310
|
+
#gridContainer
|
|
4311
|
+
[class.is-resizing]="resizing()"
|
|
4312
|
+
[style.--studio-split]="studioSplit() + '%'"
|
|
4313
|
+
>
|
|
4314
|
+
<!-- Controles: columna izquierda del reparto en escritorio; ancho completo bajo 1024px. -->
|
|
3630
4315
|
<div class="controls">
|
|
4316
|
+
<!-- ── Compartido (claro y oscuro) ── -->
|
|
3631
4317
|
<p class="group-title">{{ t('group.shared') }}</p>
|
|
3632
4318
|
|
|
3633
4319
|
<!-- Marca -->
|
|
3634
|
-
<section class="control-card">
|
|
4320
|
+
<section class="control-card" solReveal [solRevealIndex]="0">
|
|
3635
4321
|
<h2 class="card-title">{{ t('brand.title') }}</h2>
|
|
3636
|
-
|
|
3637
|
-
<span class="control-label">{{ t('brand.name') }}</span>
|
|
3638
|
-
<input
|
|
3639
|
-
class="text-input"
|
|
3640
|
-
type="text"
|
|
3641
|
-
maxlength="80"
|
|
3642
|
-
data-testid="brand-name"
|
|
3643
|
-
[value]="themeName()"
|
|
3644
|
-
[placeholder]="t('brand.namePlaceholder')"
|
|
3645
|
-
(change)="themeName.set(inputValue($event))"
|
|
3646
|
-
/>
|
|
3647
|
-
</label>
|
|
3648
|
-
@for (slot of logoSlots; track slot.target) {
|
|
4322
|
+
@if (feature().themeName) {
|
|
3649
4323
|
<div class="control-row">
|
|
3650
|
-
<span class="control-label">{{ t(
|
|
3651
|
-
<
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
[loading]="uploading() === slot.target"
|
|
3661
|
-
[disabled]="uploading() !== null"
|
|
3662
|
-
(clicked)="openFilePicker(slot.target)"
|
|
3663
|
-
>
|
|
3664
|
-
<sol-icon name="photo" size="sm" />
|
|
3665
|
-
{{ t('brand.attach') }}
|
|
3666
|
-
</sol-button>
|
|
3667
|
-
}
|
|
3668
|
-
@if (imageUrl(slot.target)) {
|
|
3669
|
-
<sol-button
|
|
3670
|
-
variant="ghost"
|
|
3671
|
-
size="sm"
|
|
3672
|
-
[attr.data-testid]="'remove-' + slot.target"
|
|
3673
|
-
[disabled]="uploading() !== null"
|
|
3674
|
-
(clicked)="removeImage(slot.target)"
|
|
3675
|
-
>
|
|
3676
|
-
<sol-icon name="trash" size="sm" />
|
|
3677
|
-
{{ t('brand.remove') }}
|
|
3678
|
-
</sol-button>
|
|
3679
|
-
}
|
|
3680
|
-
</div>
|
|
4324
|
+
<span class="control-label">{{ t('brand.name') }}</span>
|
|
4325
|
+
<input
|
|
4326
|
+
class="text-input"
|
|
4327
|
+
type="text"
|
|
4328
|
+
maxlength="80"
|
|
4329
|
+
data-testid="brand-name"
|
|
4330
|
+
[value]="themeName()"
|
|
4331
|
+
[placeholder]="t('brand.namePlaceholder')"
|
|
4332
|
+
(change)="themeName.set(inputValue($event))"
|
|
4333
|
+
/>
|
|
3681
4334
|
</div>
|
|
3682
4335
|
}
|
|
3683
|
-
|
|
3684
|
-
<
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
4336
|
+
<div class="control-row">
|
|
4337
|
+
<span class="control-label">{{ t('brand.logo') }}</span>
|
|
4338
|
+
<div class="swatch-row">
|
|
4339
|
+
@if (imageUrl('logo'); as url) {
|
|
4340
|
+
<img class="logo-thumb" [src]="url" [alt]="t('brand.logoAlt')" />
|
|
4341
|
+
}
|
|
4342
|
+
@if (canUpload) {
|
|
4343
|
+
<sol-button
|
|
4344
|
+
type="button"
|
|
4345
|
+
data-testid="brand-logo-attach"
|
|
4346
|
+
variant="ghost"
|
|
4347
|
+
size="sm"
|
|
4348
|
+
[loading]="uploadingLogo() === 'logo'"
|
|
4349
|
+
[disabled]="uploadingLogo() !== null"
|
|
4350
|
+
(clicked)="logoFileInput.click()"
|
|
4351
|
+
>
|
|
4352
|
+
<sol-icon name="image" size="sm" />
|
|
4353
|
+
{{ t('brand.attach') }}
|
|
4354
|
+
</sol-button>
|
|
4355
|
+
}
|
|
4356
|
+
@if (brandForm().url) {
|
|
4357
|
+
<sol-button
|
|
4358
|
+
type="button"
|
|
4359
|
+
data-testid="brand-logo-remove"
|
|
4360
|
+
variant="ghost"
|
|
4361
|
+
size="sm"
|
|
4362
|
+
[disabled]="uploadingLogo() !== null"
|
|
4363
|
+
(clicked)="removeImage('logo')"
|
|
4364
|
+
>
|
|
4365
|
+
<sol-icon name="trash" size="sm" />
|
|
4366
|
+
{{ t('brand.remove') }}
|
|
4367
|
+
</sol-button>
|
|
4368
|
+
}
|
|
4369
|
+
<input
|
|
4370
|
+
#logoFileInput
|
|
4371
|
+
type="file"
|
|
4372
|
+
hidden
|
|
4373
|
+
data-testid="brand-logo-file"
|
|
4374
|
+
[attr.accept]="logoAccept"
|
|
4375
|
+
(change)="onImageSelected('logo', $event)"
|
|
4376
|
+
/>
|
|
4377
|
+
</div>
|
|
4378
|
+
</div>
|
|
4379
|
+
<div class="control-row">
|
|
4380
|
+
<span class="control-label">{{ t('brand.logoDark') }}</span>
|
|
4381
|
+
<div class="swatch-row">
|
|
4382
|
+
@if (imageUrl('logoDark'); as url) {
|
|
4383
|
+
<img class="logo-thumb" [src]="url" [alt]="t('brand.logoDarkAlt')" />
|
|
4384
|
+
}
|
|
4385
|
+
@if (canUpload) {
|
|
4386
|
+
<sol-button
|
|
4387
|
+
type="button"
|
|
4388
|
+
data-testid="brand-logo-dark-attach"
|
|
4389
|
+
variant="ghost"
|
|
4390
|
+
size="sm"
|
|
4391
|
+
[loading]="uploadingLogo() === 'logoDark'"
|
|
4392
|
+
[disabled]="uploadingLogo() !== null"
|
|
4393
|
+
(clicked)="logoDarkFileInput.click()"
|
|
4394
|
+
>
|
|
4395
|
+
<sol-icon name="image" size="sm" />
|
|
4396
|
+
{{ t('brand.attach') }}
|
|
4397
|
+
</sol-button>
|
|
4398
|
+
}
|
|
4399
|
+
@if (brandForm().urlDark) {
|
|
4400
|
+
<sol-button
|
|
4401
|
+
type="button"
|
|
4402
|
+
data-testid="brand-logo-dark-remove"
|
|
4403
|
+
variant="ghost"
|
|
4404
|
+
size="sm"
|
|
4405
|
+
[disabled]="uploadingLogo() !== null"
|
|
4406
|
+
(clicked)="removeImage('logoDark')"
|
|
4407
|
+
>
|
|
4408
|
+
<sol-icon name="trash" size="sm" />
|
|
4409
|
+
{{ t('brand.remove') }}
|
|
4410
|
+
</sol-button>
|
|
4411
|
+
}
|
|
4412
|
+
<input
|
|
4413
|
+
#logoDarkFileInput
|
|
4414
|
+
type="file"
|
|
4415
|
+
hidden
|
|
4416
|
+
data-testid="brand-logo-dark-file"
|
|
4417
|
+
[attr.accept]="logoAccept"
|
|
4418
|
+
(change)="onImageSelected('logoDark', $event)"
|
|
4419
|
+
/>
|
|
4420
|
+
</div>
|
|
4421
|
+
</div>
|
|
4422
|
+
<div class="control-row">
|
|
3689
4423
|
<span class="control-label">{{ t('brand.altText') }}</span>
|
|
3690
4424
|
<input
|
|
3691
4425
|
class="text-input"
|
|
@@ -3695,8 +4429,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3695
4429
|
[placeholder]="t('brand.altTextPlaceholder')"
|
|
3696
4430
|
(change)="setBrandField('altText', inputValue($event))"
|
|
3697
4431
|
/>
|
|
3698
|
-
</
|
|
3699
|
-
<
|
|
4432
|
+
</div>
|
|
4433
|
+
<div class="control-row">
|
|
3700
4434
|
<span class="control-label">
|
|
3701
4435
|
{{ t('brand.width') }}
|
|
3702
4436
|
<b class="range-value">{{ brandForm().width }}px</b>
|
|
@@ -3704,58 +4438,226 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3704
4438
|
<input
|
|
3705
4439
|
type="range"
|
|
3706
4440
|
class="range"
|
|
4441
|
+
data-testid="range-brand-width"
|
|
3707
4442
|
[min]="brandWidthMin"
|
|
3708
4443
|
[max]="brandWidthMax"
|
|
3709
4444
|
step="1"
|
|
3710
4445
|
[value]="brandForm().width"
|
|
3711
4446
|
(input)="setBrandField('width', numberValue($event))"
|
|
3712
4447
|
/>
|
|
3713
|
-
</
|
|
4448
|
+
</div>
|
|
4449
|
+
<div class="control-row">
|
|
4450
|
+
<span class="control-label">{{ t('brand.favicon') }}</span>
|
|
4451
|
+
<div class="swatch-row">
|
|
4452
|
+
@if (imageUrl('favicon'); as url) {
|
|
4453
|
+
<img class="logo-thumb" [src]="url" [alt]="t('brand.faviconAlt')" />
|
|
4454
|
+
}
|
|
4455
|
+
@if (canUpload) {
|
|
4456
|
+
<sol-button
|
|
4457
|
+
type="button"
|
|
4458
|
+
data-testid="brand-favicon-attach"
|
|
4459
|
+
variant="ghost"
|
|
4460
|
+
size="sm"
|
|
4461
|
+
[loading]="uploadingFavicon()"
|
|
4462
|
+
[disabled]="uploadingFavicon()"
|
|
4463
|
+
(clicked)="faviconFileInput.click()"
|
|
4464
|
+
>
|
|
4465
|
+
<sol-icon name="image" size="sm" />
|
|
4466
|
+
{{ t('brand.attach') }}
|
|
4467
|
+
</sol-button>
|
|
4468
|
+
}
|
|
4469
|
+
@if (favicon()) {
|
|
4470
|
+
<sol-button
|
|
4471
|
+
type="button"
|
|
4472
|
+
data-testid="brand-favicon-remove"
|
|
4473
|
+
variant="ghost"
|
|
4474
|
+
size="sm"
|
|
4475
|
+
[disabled]="uploadingFavicon()"
|
|
4476
|
+
(clicked)="removeImage('favicon')"
|
|
4477
|
+
>
|
|
4478
|
+
<sol-icon name="trash" size="sm" />
|
|
4479
|
+
{{ t('brand.remove') }}
|
|
4480
|
+
</sol-button>
|
|
4481
|
+
}
|
|
4482
|
+
<input
|
|
4483
|
+
#faviconFileInput
|
|
4484
|
+
type="file"
|
|
4485
|
+
hidden
|
|
4486
|
+
data-testid="brand-favicon-file"
|
|
4487
|
+
[attr.accept]="faviconAccept"
|
|
4488
|
+
(change)="onImageSelected('favicon', $event)"
|
|
4489
|
+
/>
|
|
4490
|
+
</div>
|
|
4491
|
+
</div>
|
|
4492
|
+
<p class="field-hint">{{ t('brand.faviconHint') }}</p>
|
|
4493
|
+
@if (!canUpload) {
|
|
4494
|
+
<p class="field-hint" data-testid="upload-unavailable">{{ t('brand.uploadUnavailable') }}</p>
|
|
4495
|
+
}
|
|
3714
4496
|
</section>
|
|
3715
4497
|
|
|
3716
4498
|
<!-- Pie de página -->
|
|
3717
|
-
<section class="control-card">
|
|
4499
|
+
<section class="control-card" solReveal [solRevealIndex]="1">
|
|
3718
4500
|
<h2 class="card-title">{{ t('footer.title') }}</h2>
|
|
3719
|
-
<
|
|
4501
|
+
<div class="control-row">
|
|
3720
4502
|
<span class="control-label">{{ t('footer.text') }}</span>
|
|
3721
4503
|
<input
|
|
3722
4504
|
class="text-input"
|
|
3723
4505
|
type="text"
|
|
3724
|
-
maxlength="
|
|
4506
|
+
maxlength="200"
|
|
3725
4507
|
data-testid="footer-text"
|
|
3726
4508
|
[value]="tagline()"
|
|
3727
|
-
[placeholder]="t('footer.placeholder')"
|
|
4509
|
+
[placeholder]="footerPlaceholder() ?? t('footer.placeholder')"
|
|
3728
4510
|
(change)="tagline.set(inputValue($event))"
|
|
3729
4511
|
/>
|
|
3730
|
-
</
|
|
4512
|
+
</div>
|
|
3731
4513
|
</section>
|
|
3732
4514
|
|
|
3733
|
-
<!--
|
|
3734
|
-
|
|
3735
|
-
<
|
|
3736
|
-
|
|
3737
|
-
<
|
|
3738
|
-
|
|
4515
|
+
<!-- Diseño del inicio de sesión -->
|
|
4516
|
+
<section class="control-card" solReveal [solRevealIndex]="2">
|
|
4517
|
+
<h2 class="card-title">{{ t('auth.title') }}</h2>
|
|
4518
|
+
<div class="control-row">
|
|
4519
|
+
<span class="control-label">{{ t('auth.layout') }}</span>
|
|
4520
|
+
<div class="segmented">
|
|
4521
|
+
@for (option of authLayoutOptions; track option.value) {
|
|
3739
4522
|
<button
|
|
3740
4523
|
type="button"
|
|
3741
4524
|
class="seg-btn"
|
|
3742
|
-
[class.active]="form()
|
|
3743
|
-
[attr.
|
|
3744
|
-
|
|
3745
|
-
(click)="setChoice(group.key, option.value)"
|
|
4525
|
+
[class.active]="form().authLayout === option.value"
|
|
4526
|
+
[attr.data-testid]="'seg-authLayout-' + option.value"
|
|
4527
|
+
(click)="setChoice('authLayout', option.value)"
|
|
3746
4528
|
>
|
|
3747
4529
|
{{ t(option.labelKey) }}
|
|
3748
4530
|
</button>
|
|
3749
4531
|
}
|
|
3750
4532
|
</div>
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
4533
|
+
</div>
|
|
4534
|
+
</section>
|
|
4535
|
+
|
|
4536
|
+
<!-- Modo por defecto -->
|
|
4537
|
+
<section class="control-card" solReveal [solRevealIndex]="2">
|
|
4538
|
+
<h2 class="card-title">{{ t('defaultMode.title') }}</h2>
|
|
4539
|
+
<div class="control-row">
|
|
4540
|
+
<div class="segmented">
|
|
4541
|
+
@for (option of defaultModeOptions; track option.value) {
|
|
4542
|
+
<button
|
|
4543
|
+
type="button"
|
|
4544
|
+
class="seg-btn"
|
|
4545
|
+
[class.active]="form().defaultMode === option.value"
|
|
4546
|
+
[attr.data-testid]="'seg-defaultMode-' + option.value"
|
|
4547
|
+
(click)="setChoice('defaultMode', option.value)"
|
|
4548
|
+
>
|
|
4549
|
+
{{ t(option.labelKey) }}
|
|
4550
|
+
</button>
|
|
4551
|
+
}
|
|
4552
|
+
</div>
|
|
4553
|
+
</div>
|
|
4554
|
+
</section>
|
|
4555
|
+
|
|
4556
|
+
<!-- Tablas -->
|
|
4557
|
+
<section class="control-card" solReveal [solRevealIndex]="3">
|
|
4558
|
+
<h2 class="card-title">{{ t('table.title') }}</h2>
|
|
4559
|
+
<div class="control-row">
|
|
4560
|
+
<span class="control-label">{{ t('table.variant') }}</span>
|
|
4561
|
+
<div class="segmented">
|
|
4562
|
+
@for (option of tableVariantOptions; track option.value) {
|
|
4563
|
+
<button
|
|
4564
|
+
type="button"
|
|
4565
|
+
class="seg-btn"
|
|
4566
|
+
[class.active]="form().tableVariant === option.value"
|
|
4567
|
+
[attr.data-testid]="'seg-tableVariant-' + option.value"
|
|
4568
|
+
(click)="setChoice('tableVariant', option.value)"
|
|
4569
|
+
>
|
|
4570
|
+
{{ t(option.labelKey) }}
|
|
4571
|
+
</button>
|
|
4572
|
+
}
|
|
4573
|
+
</div>
|
|
4574
|
+
<p class="field-hint">{{ t('table.hint') }}</p>
|
|
4575
|
+
</div>
|
|
4576
|
+
</section>
|
|
4577
|
+
|
|
4578
|
+
<!-- Loader / spinner (opcional) -->
|
|
4579
|
+
@if (feature().loader) {
|
|
4580
|
+
<section class="control-card" solReveal [solRevealIndex]="3" data-testid="studio-loader-section">
|
|
4581
|
+
<h2 class="card-title">{{ t('loader.title') }}</h2>
|
|
4582
|
+
<div class="control-row">
|
|
4583
|
+
<span class="control-label">{{ t('loader.image') }}</span>
|
|
4584
|
+
<div class="swatch-row">
|
|
4585
|
+
@if (imageUrl('loaderImage'); as url) {
|
|
4586
|
+
<img class="logo-thumb" [src]="url" [alt]="t('loader.imageAlt')" />
|
|
4587
|
+
}
|
|
4588
|
+
@if (canUpload) {
|
|
4589
|
+
<sol-button
|
|
4590
|
+
type="button"
|
|
4591
|
+
data-testid="loader-image-attach"
|
|
4592
|
+
variant="ghost"
|
|
4593
|
+
size="sm"
|
|
4594
|
+
[loading]="uploadingLoaderImage()"
|
|
4595
|
+
[disabled]="uploadingLoaderImage()"
|
|
4596
|
+
(clicked)="loaderFileInput.click()"
|
|
4597
|
+
>
|
|
4598
|
+
<sol-icon name="image" size="sm" />
|
|
4599
|
+
{{ t('brand.attach') }}
|
|
4600
|
+
</sol-button>
|
|
4601
|
+
}
|
|
4602
|
+
@if (loaderForm().image) {
|
|
4603
|
+
<sol-button
|
|
4604
|
+
type="button"
|
|
4605
|
+
data-testid="loader-image-remove"
|
|
4606
|
+
variant="ghost"
|
|
4607
|
+
size="sm"
|
|
4608
|
+
[disabled]="uploadingLoaderImage()"
|
|
4609
|
+
(clicked)="removeImage('loaderImage')"
|
|
4610
|
+
>
|
|
4611
|
+
<sol-icon name="trash" size="sm" />
|
|
4612
|
+
{{ t('brand.remove') }}
|
|
4613
|
+
</sol-button>
|
|
4614
|
+
}
|
|
4615
|
+
<input
|
|
4616
|
+
#loaderFileInput
|
|
4617
|
+
type="file"
|
|
4618
|
+
hidden
|
|
4619
|
+
data-testid="loader-image-file"
|
|
4620
|
+
[attr.accept]="logoAccept"
|
|
4621
|
+
(change)="onImageSelected('loaderImage', $event)"
|
|
4622
|
+
/>
|
|
4623
|
+
</div>
|
|
4624
|
+
</div>
|
|
4625
|
+
<div class="control-row">
|
|
4626
|
+
<span class="control-label">{{ t('loader.presentation') }}</span>
|
|
4627
|
+
<div class="segmented">
|
|
4628
|
+
@for (option of loaderPresentationOptions; track option.value) {
|
|
4629
|
+
<button
|
|
4630
|
+
type="button"
|
|
4631
|
+
class="seg-btn"
|
|
4632
|
+
[class.active]="loaderForm().presentation === option.value"
|
|
4633
|
+
(click)="setLoaderChoice('presentation', option.value)"
|
|
4634
|
+
>
|
|
4635
|
+
{{ t(option.labelKey) }}
|
|
4636
|
+
</button>
|
|
4637
|
+
}
|
|
4638
|
+
</div>
|
|
4639
|
+
</div>
|
|
4640
|
+
<div class="control-row">
|
|
4641
|
+
<span class="control-label">{{ t('loader.animation') }}</span>
|
|
4642
|
+
<div class="segmented">
|
|
4643
|
+
@for (option of loaderAnimationOptions; track option.value) {
|
|
4644
|
+
<button
|
|
4645
|
+
type="button"
|
|
4646
|
+
class="seg-btn"
|
|
4647
|
+
[class.active]="loaderForm().animation === option.value"
|
|
4648
|
+
(click)="setLoaderChoice('animation', option.value)"
|
|
4649
|
+
>
|
|
4650
|
+
{{ t(option.labelKey) }}
|
|
4651
|
+
</button>
|
|
4652
|
+
}
|
|
4653
|
+
</div>
|
|
4654
|
+
<p class="field-hint">{{ t('loader.hint') }}</p>
|
|
4655
|
+
</div>
|
|
3754
4656
|
</section>
|
|
3755
4657
|
}
|
|
3756
4658
|
|
|
3757
4659
|
<!-- Tipografía -->
|
|
3758
|
-
<section class="control-card">
|
|
4660
|
+
<section class="control-card" solReveal [solRevealIndex]="3">
|
|
3759
4661
|
<h2 class="card-title">{{ t('typography.title') }}</h2>
|
|
3760
4662
|
@for (role of fontRoles; track role.key) {
|
|
3761
4663
|
<div class="control-row">
|
|
@@ -3766,7 +4668,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3766
4668
|
type="button"
|
|
3767
4669
|
class="font-btn"
|
|
3768
4670
|
[class.active]="form()[role.key] === family"
|
|
3769
|
-
[attr.aria-pressed]="form()[role.key] === family"
|
|
3770
4671
|
[style.font-family]="fontStackFor(family)"
|
|
3771
4672
|
(click)="setField(role.key, family)"
|
|
3772
4673
|
>
|
|
@@ -3774,14 +4675,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3774
4675
|
</button>
|
|
3775
4676
|
}
|
|
3776
4677
|
</div>
|
|
4678
|
+
<p class="field-hint">{{ t('typography.moreFonts') }}</p>
|
|
3777
4679
|
<select
|
|
3778
4680
|
class="font-select"
|
|
3779
|
-
[attr.
|
|
4681
|
+
[attr.data-testid]="role.testId"
|
|
3780
4682
|
[value]="form()[role.key]"
|
|
4683
|
+
[style.font-family]="fontStackFor(form()[role.key])"
|
|
3781
4684
|
(change)="setField(role.key, inputValue($event))"
|
|
3782
4685
|
>
|
|
3783
4686
|
@for (family of role.catalog; track family) {
|
|
3784
|
-
<option [value]="family">{{ family }}</option>
|
|
4687
|
+
<option [value]="family" [style.font-family]="fontStackFor(family)">{{ family }}</option>
|
|
3785
4688
|
}
|
|
3786
4689
|
</select>
|
|
3787
4690
|
</div>
|
|
@@ -3791,52 +4694,138 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3791
4694
|
<span class="control-label">{{ t(group.labelKey) }}</span>
|
|
3792
4695
|
<div class="segmented">
|
|
3793
4696
|
@for (option of group.options; track option.value) {
|
|
3794
|
-
<button
|
|
4697
|
+
<button
|
|
4698
|
+
type="button"
|
|
4699
|
+
class="seg-btn"
|
|
4700
|
+
[class.active]="form()[group.key] === option.value"
|
|
4701
|
+
(click)="setChoice(group.key, option.value)"
|
|
4702
|
+
>
|
|
3795
4703
|
{{ t(option.labelKey) }}
|
|
3796
4704
|
</button>
|
|
3797
4705
|
}
|
|
3798
4706
|
</div>
|
|
3799
4707
|
</div>
|
|
3800
4708
|
}
|
|
3801
|
-
<
|
|
3802
|
-
<span class="control-label">
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
<
|
|
3807
|
-
|
|
3808
|
-
|
|
4709
|
+
<div class="control-row">
|
|
4710
|
+
<span class="control-label">
|
|
4711
|
+
{{ t('typography.baseSize') }}
|
|
4712
|
+
<b class="range-value">{{ form().baseSize }}px</b>
|
|
4713
|
+
</span>
|
|
4714
|
+
<input
|
|
4715
|
+
type="range"
|
|
4716
|
+
class="range"
|
|
4717
|
+
data-testid="range-base-size"
|
|
4718
|
+
[min]="baseSizeMin"
|
|
4719
|
+
[max]="baseSizeMax"
|
|
4720
|
+
step="0.5"
|
|
4721
|
+
[value]="form().baseSize"
|
|
4722
|
+
(input)="setField('baseSize', numberValue($event))"
|
|
4723
|
+
/>
|
|
4724
|
+
</div>
|
|
4725
|
+
<div class="control-row">
|
|
4726
|
+
<span class="control-label">
|
|
4727
|
+
{{ t('typography.lineHeight') }}
|
|
4728
|
+
<b class="range-value">{{ form().lineHeight }}</b>
|
|
4729
|
+
</span>
|
|
4730
|
+
<input
|
|
4731
|
+
type="range"
|
|
4732
|
+
class="range"
|
|
4733
|
+
data-testid="range-line-height"
|
|
4734
|
+
[min]="lineHeightMin"
|
|
4735
|
+
[max]="lineHeightMax"
|
|
4736
|
+
step="0.1"
|
|
4737
|
+
[value]="form().lineHeight"
|
|
4738
|
+
(input)="setField('lineHeight', numberValue($event))"
|
|
4739
|
+
/>
|
|
4740
|
+
</div>
|
|
3809
4741
|
</section>
|
|
3810
4742
|
|
|
3811
|
-
<!-- Forma
|
|
3812
|
-
|
|
3813
|
-
<
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
4743
|
+
<!-- Forma -->
|
|
4744
|
+
<section class="control-card" solReveal [solRevealIndex]="4">
|
|
4745
|
+
<h2 class="card-title">{{ t('shape.title') }}</h2>
|
|
4746
|
+
<div class="control-row">
|
|
4747
|
+
<span class="control-label">
|
|
4748
|
+
{{ t('shape.radius') }}
|
|
4749
|
+
<b class="range-value">{{ form().radius }}px</b>
|
|
4750
|
+
</span>
|
|
4751
|
+
<input
|
|
4752
|
+
type="range"
|
|
4753
|
+
class="range"
|
|
4754
|
+
data-testid="range-radius"
|
|
4755
|
+
[min]="radiusMin"
|
|
4756
|
+
[max]="radiusMax"
|
|
4757
|
+
step="1"
|
|
4758
|
+
[value]="form().radius"
|
|
4759
|
+
(input)="setField('radius', numberValue($event))"
|
|
4760
|
+
/>
|
|
4761
|
+
</div>
|
|
4762
|
+
@for (group of shapeGroups; track group.key) {
|
|
4763
|
+
<div class="control-row">
|
|
4764
|
+
<span class="control-label">{{ t(group.labelKey) }}</span>
|
|
4765
|
+
<div class="segmented">
|
|
4766
|
+
@for (option of group.options; track option.value) {
|
|
4767
|
+
<button
|
|
4768
|
+
type="button"
|
|
4769
|
+
class="seg-btn"
|
|
4770
|
+
[class.active]="form()[group.key] === option.value"
|
|
4771
|
+
(click)="setChoice(group.key, option.value)"
|
|
4772
|
+
>
|
|
4773
|
+
{{ t(option.labelKey) }}
|
|
4774
|
+
</button>
|
|
4775
|
+
}
|
|
3831
4776
|
</div>
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
4777
|
+
</div>
|
|
4778
|
+
}
|
|
4779
|
+
</section>
|
|
3835
4780
|
|
|
3836
|
-
<!--
|
|
4781
|
+
<!-- Densidad y bordes -->
|
|
4782
|
+
<section class="control-card" solReveal [solRevealIndex]="5">
|
|
4783
|
+
<h2 class="card-title">{{ t('structure.sharedTitle') }}</h2>
|
|
4784
|
+
@for (group of sharedStructureGroups; track group.key) {
|
|
4785
|
+
<div class="control-row">
|
|
4786
|
+
<span class="control-label">{{ t(group.labelKey) }}</span>
|
|
4787
|
+
<div class="segmented">
|
|
4788
|
+
@for (option of group.options; track option.value) {
|
|
4789
|
+
<button
|
|
4790
|
+
type="button"
|
|
4791
|
+
class="seg-btn"
|
|
4792
|
+
[class.active]="form()[group.key] === option.value"
|
|
4793
|
+
(click)="setChoice(group.key, option.value)"
|
|
4794
|
+
>
|
|
4795
|
+
{{ t(option.labelKey) }}
|
|
4796
|
+
</button>
|
|
4797
|
+
}
|
|
4798
|
+
</div>
|
|
4799
|
+
</div>
|
|
4800
|
+
}
|
|
4801
|
+
</section>
|
|
4802
|
+
|
|
4803
|
+
<!-- Movimiento -->
|
|
4804
|
+
<section class="control-card" solReveal [solRevealIndex]="6">
|
|
4805
|
+
<h2 class="card-title">{{ t('motion.title') }}</h2>
|
|
4806
|
+
@for (group of motionGroups; track group.key) {
|
|
4807
|
+
<div class="control-row">
|
|
4808
|
+
<span class="control-label">{{ t(group.labelKey) }}</span>
|
|
4809
|
+
<div class="segmented">
|
|
4810
|
+
@for (option of group.options; track option.value) {
|
|
4811
|
+
<button
|
|
4812
|
+
type="button"
|
|
4813
|
+
class="seg-btn"
|
|
4814
|
+
[class.active]="form()[group.key] === option.value"
|
|
4815
|
+
(click)="setChoice(group.key, option.value)"
|
|
4816
|
+
>
|
|
4817
|
+
{{ t(option.labelKey) }}
|
|
4818
|
+
</button>
|
|
4819
|
+
}
|
|
4820
|
+
</div>
|
|
4821
|
+
</div>
|
|
4822
|
+
}
|
|
4823
|
+
</section>
|
|
4824
|
+
|
|
4825
|
+
<!-- ── Por modo (claro / oscuro) ── -->
|
|
3837
4826
|
<div class="mode-tabs-head">
|
|
3838
4827
|
<p class="group-title">{{ t('group.perMode') }}</p>
|
|
3839
|
-
<div class="mode-tabs" role="tablist">
|
|
4828
|
+
<div class="mode-tabs" role="tablist" data-testid="theme-mode-tabs">
|
|
3840
4829
|
@for (mode of modes; track mode) {
|
|
3841
4830
|
<button
|
|
3842
4831
|
type="button"
|
|
@@ -3853,8 +4842,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3853
4842
|
</div>
|
|
3854
4843
|
</div>
|
|
3855
4844
|
|
|
3856
|
-
@for (section of colorSections(); track section.titleKey) {
|
|
3857
|
-
<section class="control-card">
|
|
4845
|
+
@for (section of colorSections(); track section.titleKey; let i = $index) {
|
|
4846
|
+
<section class="control-card" solReveal [solRevealIndex]="7 + i">
|
|
3858
4847
|
<h2 class="card-title">{{ t(section.titleKey) }}</h2>
|
|
3859
4848
|
@for (field of section.fields; track field.key) {
|
|
3860
4849
|
<div class="control-row">
|
|
@@ -3873,7 +4862,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3873
4862
|
<input
|
|
3874
4863
|
class="swatch-picker"
|
|
3875
4864
|
type="color"
|
|
3876
|
-
[attr.aria-label]="t(field.labelKey)"
|
|
3877
4865
|
[value]="modeForm()[field.key]"
|
|
3878
4866
|
(input)="setModeColor(field.key, inputValue($event))"
|
|
3879
4867
|
/>
|
|
@@ -3881,7 +4869,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3881
4869
|
class="hex-input"
|
|
3882
4870
|
type="text"
|
|
3883
4871
|
maxlength="7"
|
|
3884
|
-
[attr.aria-label]="t(field.labelKey)"
|
|
3885
4872
|
[attr.data-testid]="'hex-' + field.key"
|
|
3886
4873
|
[value]="modeForm()[field.key]"
|
|
3887
4874
|
(change)="onModeHexChange(field.key, $event)"
|
|
@@ -3895,14 +4882,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3895
4882
|
</section>
|
|
3896
4883
|
}
|
|
3897
4884
|
|
|
3898
|
-
<!-- Sombra (por modo) -->
|
|
3899
|
-
<section class="control-card">
|
|
4885
|
+
<!-- Sombra (por modo): estilo + tamaño (compartido) + color + orientación -->
|
|
4886
|
+
<section class="control-card" solReveal [solRevealIndex]="9">
|
|
3900
4887
|
<h2 class="card-title">{{ t('shadow.title') }}</h2>
|
|
3901
4888
|
<div class="control-row">
|
|
3902
4889
|
<span class="control-label">{{ t('shadow.style') }}</span>
|
|
3903
4890
|
<div class="segmented">
|
|
3904
4891
|
@for (option of shadowStyleOptions; track option.value) {
|
|
3905
|
-
<button
|
|
4892
|
+
<button
|
|
4893
|
+
type="button"
|
|
4894
|
+
class="seg-btn"
|
|
4895
|
+
[class.active]="modeForm().shadow === option.value"
|
|
4896
|
+
(click)="setModeChoice('shadow', option.value)"
|
|
4897
|
+
>
|
|
3906
4898
|
{{ t(option.labelKey) }}
|
|
3907
4899
|
</button>
|
|
3908
4900
|
}
|
|
@@ -3912,7 +4904,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3912
4904
|
<span class="control-label">{{ t('shadow.size') }}</span>
|
|
3913
4905
|
<div class="segmented">
|
|
3914
4906
|
@for (option of shadowSizeOptions; track option.value) {
|
|
3915
|
-
<button
|
|
4907
|
+
<button
|
|
4908
|
+
type="button"
|
|
4909
|
+
class="seg-btn"
|
|
4910
|
+
[class.active]="form().shadowSize === option.value"
|
|
4911
|
+
(click)="setChoice('shadowSize', option.value)"
|
|
4912
|
+
>
|
|
3916
4913
|
{{ t(option.labelKey) }}
|
|
3917
4914
|
</button>
|
|
3918
4915
|
}
|
|
@@ -3922,22 +4919,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3922
4919
|
<span class="control-label">{{ t('shadow.color') }}</span>
|
|
3923
4920
|
<div class="swatch-row">
|
|
3924
4921
|
@for (color of shadowColorSuggestions; track color) {
|
|
3925
|
-
<button
|
|
4922
|
+
<button
|
|
4923
|
+
type="button"
|
|
4924
|
+
class="swatch"
|
|
4925
|
+
[class.active]="modeForm().shadowColor === color"
|
|
4926
|
+
[style.background]="color"
|
|
4927
|
+
[attr.aria-label]="color"
|
|
4928
|
+
(click)="setModeColor('shadowColor', color)"
|
|
4929
|
+
></button>
|
|
3926
4930
|
}
|
|
3927
|
-
<input
|
|
3928
|
-
|
|
4931
|
+
<input
|
|
4932
|
+
class="swatch-picker"
|
|
4933
|
+
type="color"
|
|
4934
|
+
[value]="modeForm().shadowColor"
|
|
4935
|
+
(input)="setModeColor('shadowColor', inputValue($event))"
|
|
4936
|
+
/>
|
|
4937
|
+
<input
|
|
4938
|
+
class="hex-input"
|
|
4939
|
+
type="text"
|
|
4940
|
+
maxlength="7"
|
|
4941
|
+
data-testid="hex-shadowColor"
|
|
4942
|
+
[value]="modeForm().shadowColor"
|
|
4943
|
+
(change)="onModeHexChange('shadowColor', $event)"
|
|
4944
|
+
/>
|
|
3929
4945
|
</div>
|
|
3930
4946
|
</div>
|
|
3931
4947
|
<div class="control-row">
|
|
3932
4948
|
<span class="control-label">{{ t('shadow.direction') }}</span>
|
|
3933
|
-
<div class="dir-grid">
|
|
4949
|
+
<div class="dir-grid" data-testid="shadow-direction">
|
|
3934
4950
|
@for (direction of shadowDirections; track direction.value) {
|
|
3935
4951
|
<button
|
|
3936
4952
|
type="button"
|
|
3937
4953
|
class="dir-cell"
|
|
3938
4954
|
[class.active]="modeForm().shadowDirection === direction.value"
|
|
3939
4955
|
[attr.aria-label]="t('shadow.dir.' + direction.value)"
|
|
3940
|
-
[attr.
|
|
4956
|
+
[attr.data-testid]="'dir-' + direction.value"
|
|
3941
4957
|
(click)="setModeChoice('shadowDirection', direction.value)"
|
|
3942
4958
|
>
|
|
3943
4959
|
<span aria-hidden="true">{{ direction.glyph }}</span>
|
|
@@ -3947,14 +4963,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3947
4963
|
</div>
|
|
3948
4964
|
</section>
|
|
3949
4965
|
|
|
3950
|
-
<!-- Textura (por modo) -->
|
|
3951
|
-
<section class="control-card">
|
|
4966
|
+
<!-- Textura de fondo (por modo) -->
|
|
4967
|
+
<section class="control-card" solReveal [solRevealIndex]="10">
|
|
3952
4968
|
<h2 class="card-title">{{ t('texture.title') }}</h2>
|
|
3953
4969
|
<div class="control-row">
|
|
3954
4970
|
<span class="control-label">{{ t('texture.pattern') }}</span>
|
|
3955
4971
|
<div class="segmented">
|
|
3956
4972
|
@for (option of textureOptions; track option.value) {
|
|
3957
|
-
<button
|
|
4973
|
+
<button
|
|
4974
|
+
type="button"
|
|
4975
|
+
class="seg-btn"
|
|
4976
|
+
[class.active]="modeForm().texture === option.value"
|
|
4977
|
+
(click)="setModeChoice('texture', option.value)"
|
|
4978
|
+
>
|
|
3958
4979
|
{{ t(option.labelKey) }}
|
|
3959
4980
|
</button>
|
|
3960
4981
|
}
|
|
@@ -3966,10 +4987,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3966
4987
|
<span class="control-label">{{ t(field.labelKey) }}</span>
|
|
3967
4988
|
<div class="swatch-row">
|
|
3968
4989
|
@for (color of textureColorSuggestions; track color) {
|
|
3969
|
-
<button
|
|
4990
|
+
<button
|
|
4991
|
+
type="button"
|
|
4992
|
+
class="swatch"
|
|
4993
|
+
[class.active]="modeForm()[field.key] === color"
|
|
4994
|
+
[style.background]="color"
|
|
4995
|
+
[attr.aria-label]="color"
|
|
4996
|
+
(click)="setModeColor(field.key, color)"
|
|
4997
|
+
></button>
|
|
3970
4998
|
}
|
|
3971
|
-
<input
|
|
3972
|
-
|
|
4999
|
+
<input
|
|
5000
|
+
class="swatch-picker"
|
|
5001
|
+
type="color"
|
|
5002
|
+
[value]="modeForm()[field.key]"
|
|
5003
|
+
(input)="setModeColor(field.key, inputValue($event))"
|
|
5004
|
+
/>
|
|
5005
|
+
<input
|
|
5006
|
+
class="hex-input"
|
|
5007
|
+
type="text"
|
|
5008
|
+
maxlength="7"
|
|
5009
|
+
[attr.data-testid]="'hex-' + field.key"
|
|
5010
|
+
[value]="modeForm()[field.key]"
|
|
5011
|
+
(change)="onModeHexChange(field.key, $event)"
|
|
5012
|
+
/>
|
|
3973
5013
|
</div>
|
|
3974
5014
|
</div>
|
|
3975
5015
|
}
|
|
@@ -3977,14 +5017,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3977
5017
|
</section>
|
|
3978
5018
|
|
|
3979
5019
|
<!-- Barra lateral y encabezado (por modo) -->
|
|
3980
|
-
<section class="control-card">
|
|
5020
|
+
<section class="control-card" solReveal [solRevealIndex]="11">
|
|
3981
5021
|
<h2 class="card-title">{{ t('structure.modeTitle') }}</h2>
|
|
3982
5022
|
@for (group of modeStructureGroups; track group.key) {
|
|
3983
5023
|
<div class="control-row">
|
|
3984
5024
|
<span class="control-label">{{ t(group.labelKey) }}</span>
|
|
3985
5025
|
<div class="segmented">
|
|
3986
5026
|
@for (option of group.options; track option.value) {
|
|
3987
|
-
<button
|
|
5027
|
+
<button
|
|
5028
|
+
type="button"
|
|
5029
|
+
class="seg-btn"
|
|
5030
|
+
[class.active]="modeForm()[group.key] === option.value"
|
|
5031
|
+
(click)="setModeChoice(group.key, option.value)"
|
|
5032
|
+
>
|
|
3988
5033
|
{{ t(option.labelKey) }}
|
|
3989
5034
|
</button>
|
|
3990
5035
|
}
|
|
@@ -3994,6 +5039,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3994
5039
|
</section>
|
|
3995
5040
|
</div>
|
|
3996
5041
|
|
|
5042
|
+
<!-- Divisor arrastrable (solo escritorio ≥1024px): puntero, flechas, Inicio/Fin; doble
|
|
5043
|
+
clic vuelve al reparto por defecto. -->
|
|
3997
5044
|
<div
|
|
3998
5045
|
class="grid-divider"
|
|
3999
5046
|
role="separator"
|
|
@@ -4010,8 +5057,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
4010
5057
|
<span class="grid-divider__handle" aria-hidden="true"></span>
|
|
4011
5058
|
</div>
|
|
4012
5059
|
|
|
5060
|
+
<!-- Vista previa (escritorio): card completo y pegajoso. -->
|
|
4013
5061
|
<aside class="preview-pane">
|
|
4014
|
-
<
|
|
5062
|
+
<div class="preview-toolbar">
|
|
5063
|
+
<h2 class="card-title">{{ t('preview.heading') }}</h2>
|
|
5064
|
+
<button type="button" class="mode-toggle" data-testid="preview-mode-toggle" (click)="toggleMode()">
|
|
5065
|
+
{{ activeMode() === 'dark' ? t('preview.modeDark') : t('preview.modeLight') }}
|
|
5066
|
+
</button>
|
|
5067
|
+
</div>
|
|
5068
|
+
|
|
4015
5069
|
<div class="preview-body">
|
|
4016
5070
|
<sol-theme-studio-preview
|
|
4017
5071
|
data-testid="studio-preview"
|
|
@@ -4020,106 +5074,116 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
4020
5074
|
[brand]="brandForm()"
|
|
4021
5075
|
[tagline]="tagline()"
|
|
4022
5076
|
[tableVariant]="form().tableVariant"
|
|
5077
|
+
[loader]="previewLoader()"
|
|
4023
5078
|
/>
|
|
4024
5079
|
</div>
|
|
4025
|
-
|
|
5080
|
+
|
|
5081
|
+
<div class="preview-actions">
|
|
5082
|
+
<sol-button
|
|
5083
|
+
data-testid="studio-apply"
|
|
5084
|
+
variant="primary"
|
|
5085
|
+
[loading]="applying()"
|
|
5086
|
+
[disabled]="busy()"
|
|
5087
|
+
(clicked)="requestApply()"
|
|
5088
|
+
>
|
|
5089
|
+
{{ t('actions.apply') }}
|
|
5090
|
+
</sol-button>
|
|
5091
|
+
<sol-button data-testid="studio-copy" variant="ghost" (clicked)="copyJson()">
|
|
5092
|
+
<sol-icon name="clipboard" size="sm" />
|
|
5093
|
+
{{ t('actions.copy') }}
|
|
5094
|
+
</sol-button>
|
|
5095
|
+
<sol-button data-testid="studio-export" size="touch" variant="ghost" (clicked)="exportJson()">{{ t('actions.export') }}</sol-button>
|
|
5096
|
+
<sol-button data-testid="studio-import" size="touch" variant="ghost" [loading]="importing()" [disabled]="importing() || applying()" (clicked)="themeJsonInput.click()">{{ t('actions.import') }}</sol-button>
|
|
5097
|
+
<p class="json-file-hint field-hint">{{ t('actions.jsonHint') }}</p>
|
|
5098
|
+
<p class="json-file-hint field-hint" role="status" aria-live="polite" data-testid="studio-json-status">{{ statusText() }}</p>
|
|
5099
|
+
</div>
|
|
4026
5100
|
</aside>
|
|
4027
5101
|
</div>
|
|
4028
5102
|
|
|
5103
|
+
<!-- Botón flotante (bajo 1024px): círculo al borde derecho a media altura. -->
|
|
4029
5104
|
<button
|
|
4030
5105
|
type="button"
|
|
4031
5106
|
class="preview-fab"
|
|
4032
|
-
data-testid="preview-fab"
|
|
5107
|
+
data-testid="preview-fab-mobile"
|
|
4033
5108
|
[attr.aria-label]="t('preview.open')"
|
|
4034
|
-
|
|
5109
|
+
[attr.aria-expanded]="previewOpenMobile()"
|
|
5110
|
+
(click)="previewOpenMobile.set(true)"
|
|
4035
5111
|
>
|
|
4036
5112
|
<sol-icon name="eye" size="md" />
|
|
4037
5113
|
</button>
|
|
4038
5114
|
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
[
|
|
4042
|
-
|
|
4043
|
-
size="lg"
|
|
4044
|
-
(closed)="previewOpenCompact.set(false)"
|
|
4045
|
-
>
|
|
4046
|
-
<ng-container [ngTemplateOutlet]="previewToolbar" />
|
|
4047
|
-
<sol-theme-studio-preview
|
|
4048
|
-
[theme]="effectiveTheme()"
|
|
4049
|
-
[mode]="activeMode()"
|
|
4050
|
-
[brand]="brandForm()"
|
|
4051
|
-
[tagline]="tagline()"
|
|
4052
|
-
[tableVariant]="form().tableVariant"
|
|
4053
|
-
/>
|
|
4054
|
-
<div drawerFooter>
|
|
4055
|
-
<ng-container [ngTemplateOutlet]="previewActions" />
|
|
4056
|
-
</div>
|
|
4057
|
-
</sol-drawer>
|
|
5115
|
+
<!-- Panel lateral de la vista previa (bajo 1024px): el card COMPLETO. -->
|
|
5116
|
+
@if (previewOpenMobile()) {
|
|
5117
|
+
<div class="preview-slide-over" role="dialog" aria-modal="true" [attr.aria-label]="t('preview.heading')">
|
|
5118
|
+
<div class="slide-over-backdrop" (click)="previewOpenMobile.set(false)"></div>
|
|
4058
5119
|
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
5120
|
+
<div class="slide-over-panel">
|
|
5121
|
+
<div class="slide-over-header">
|
|
5122
|
+
<h2 class="card-title">{{ t('preview.heading') }}</h2>
|
|
5123
|
+
<button type="button" class="mode-toggle" data-testid="preview-mode-toggle-mobile" (click)="toggleMode()">
|
|
5124
|
+
{{ activeMode() === 'dark' ? t('preview.modeDark') : t('preview.modeLight') }}
|
|
5125
|
+
</button>
|
|
5126
|
+
<button
|
|
5127
|
+
type="button"
|
|
5128
|
+
class="close-btn"
|
|
5129
|
+
data-testid="preview-slide-close"
|
|
5130
|
+
[attr.aria-label]="t('preview.close')"
|
|
5131
|
+
(click)="previewOpenMobile.set(false)"
|
|
5132
|
+
>
|
|
5133
|
+
<sol-icon name="x" size="md" />
|
|
5134
|
+
</button>
|
|
5135
|
+
</div>
|
|
4075
5136
|
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
5137
|
+
<div class="slide-over-body">
|
|
5138
|
+
<sol-theme-studio-preview
|
|
5139
|
+
data-testid="studio-preview-mobile"
|
|
5140
|
+
[theme]="effectiveTheme()"
|
|
5141
|
+
[mode]="activeMode()"
|
|
5142
|
+
[brand]="brandForm()"
|
|
5143
|
+
[tagline]="tagline()"
|
|
5144
|
+
[tableVariant]="form().tableVariant"
|
|
5145
|
+
[loader]="previewLoader()"
|
|
5146
|
+
/>
|
|
5147
|
+
</div>
|
|
4085
5148
|
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
>
|
|
4107
|
-
<sol-icon name="cloud-arrow-up" size="sm" />
|
|
4108
|
-
{{ t('actions.import') }}
|
|
4109
|
-
</sol-button>
|
|
4110
|
-
<p class="field-hint json-hint">{{ t('actions.jsonHint') }}</p>
|
|
4111
|
-
@if (status(); as current) {
|
|
4112
|
-
<p class="field-hint json-hint" role="status" aria-live="polite" data-testid="studio-status">
|
|
4113
|
-
{{ t(current.key, current.params) }}
|
|
4114
|
-
</p>
|
|
4115
|
-
}
|
|
5149
|
+
<div class="slide-over-footer preview-actions">
|
|
5150
|
+
<sol-button
|
|
5151
|
+
data-testid="studio-apply-mobile"
|
|
5152
|
+
variant="primary"
|
|
5153
|
+
[loading]="applying()"
|
|
5154
|
+
[disabled]="busy()"
|
|
5155
|
+
(clicked)="requestApply()"
|
|
5156
|
+
>
|
|
5157
|
+
{{ t('actions.apply') }}
|
|
5158
|
+
</sol-button>
|
|
5159
|
+
<sol-button data-testid="studio-copy-mobile" variant="ghost" (clicked)="copyJson()">
|
|
5160
|
+
<sol-icon name="clipboard" size="sm" />
|
|
5161
|
+
{{ t('actions.copy') }}
|
|
5162
|
+
</sol-button>
|
|
5163
|
+
<sol-button data-testid="studio-export-mobile" size="touch" variant="ghost" (clicked)="exportJson()">{{ t('actions.export') }}</sol-button>
|
|
5164
|
+
<sol-button data-testid="studio-import-mobile" size="touch" variant="ghost" [loading]="importing()" [disabled]="importing() || applying()" (clicked)="themeJsonInput.click()">{{ t('actions.import') }}</sol-button>
|
|
5165
|
+
<p class="json-file-hint field-hint">{{ t('actions.jsonHint') }}</p>
|
|
5166
|
+
<p class="json-file-hint field-hint" role="status" aria-live="polite" data-testid="studio-json-status-mobile">{{ statusText() }}</p>
|
|
5167
|
+
</div>
|
|
5168
|
+
</div>
|
|
4116
5169
|
</div>
|
|
4117
|
-
|
|
5170
|
+
}
|
|
5171
|
+
|
|
5172
|
+
<sol-confirm-dialog
|
|
5173
|
+
[open]="showApplyConfirm()"
|
|
5174
|
+
[title]="t('confirm.title')"
|
|
5175
|
+
[message]="t('confirm.message')"
|
|
5176
|
+
[confirmLabel]="t('confirm.confirm')"
|
|
5177
|
+
[cancelLabel]="t('confirm.cancel')"
|
|
5178
|
+
variant="warning"
|
|
5179
|
+
(confirm)="confirmApply()"
|
|
5180
|
+
(cancel)="showApplyConfirm.set(false)"
|
|
5181
|
+
/>
|
|
4118
5182
|
}
|
|
4119
5183
|
}
|
|
4120
5184
|
</div>
|
|
4121
|
-
`, styles: [":host{display:block;color:var(--sol-color-text-primary, #0F172A)}.studio{display:flex;flex-direction:column;gap:var(--sol-space-md, 16px);min-width:0;padding-bottom:var(--sol-space-xl, 32px)}.studio-title,.card-title{margin:0;font-family:var(--sol-font-display, var(--sol-font-family, system-ui, sans-serif));font-weight:var(--sol-display-weight, 700);letter-spacing:var(--sol-display-tracking, 0em);text-transform:var(--sol-display-transform, none);color:var(--sol-color-text-primary, #0F172A)}.studio-title{font-size:var(--sol-font-size-xl, 20px)}.card-title{font-size:var(--sol-font-size-lg, 16px)}.studio-subtitle{margin:var(--sol-space-xs, 4px) 0 0;font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-secondary, #475569)}.state-panel{display:flex;flex-direction:column;align-items:center;gap:var(--sol-space-sm, 8px);padding:var(--sol-space-xl, 32px) var(--sol-space-md, 16px);text-align:center;background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);color:var(--sol-color-text-secondary, #475569)}.state-panel p{margin:0}.state-panel--error{color:var(--sol-color-danger, #DC2626)}.notice{margin:0;padding:var(--sol-space-sm, 8px) var(--sol-space-md, 12px);border-radius:var(--sol-border-radius-md, 8px);background:color-mix(in srgb,var(--sol-color-info, #0284C7) 10%,transparent);color:var(--sol-color-text-primary, #0F172A);font-size:var(--sol-font-size-sm, 13px)}.inline-error{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sol-space-sm, 8px);color:var(--sol-color-danger, #DC2626);font-size:var(--sol-font-size-sm, 13px)}.history-panel{display:flex;flex-direction:column;align-items:flex-start;gap:var(--sol-space-sm, 8px)}.history-list{width:100%;margin:0;padding:0;list-style:none}.history-list li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--sol-space-md, 16px);padding-block:var(--sol-space-sm, 8px);border-bottom:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0)}.studio-grid{--studio-split: 60%;display:grid;grid-template-columns:minmax(0,1fr);gap:var(--sol-space-lg, 24px);align-items:start}.studio-grid.is-resizing{cursor:col-resize;-webkit-user-select:none;user-select:none}.controls{display:flex;flex-direction:column;gap:var(--sol-space-md, 16px);min-width:0}.group-title{margin:var(--sol-space-sm, 8px) 0 0;font-size:var(--sol-font-size-sm, 13px);font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--sol-color-text-muted, #64748B)}.control-card{display:flex;flex-direction:column;gap:var(--sol-space-md, 16px);padding:var(--sol-space-lg, 24px);background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);box-shadow:var(--sol-card-shadow, none)}.control-row{display:flex;flex-direction:column;gap:var(--sol-space-sm, 8px);min-width:0}.control-label{display:flex;justify-content:space-between;align-items:baseline;gap:var(--sol-space-sm, 8px);font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-secondary, #475569)}.range-value{font-family:var(--sol-font-numeric, var(--sol-font-family, system-ui, sans-serif));color:var(--sol-color-text-primary, #0F172A)}.swatch-row,.font-list{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sol-space-sm, 8px)}.field-hint{margin:0;font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-muted, #64748B)}.logo-thumb{width:40px;height:40px;object-fit:contain;border-radius:var(--sol-border-radius-sm, 6px);border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);background:var(--sol-bg-sunken, #F1F5F9)}.swatch{width:28px;height:28px;padding:0;border-radius:var(--sol-border-radius-full, 999px);border:2px solid var(--sol-border-color-default, #E2E8F0);cursor:pointer}.swatch.active{border-color:var(--sol-color-primary, #2563EB);box-shadow:0 0 0 2px color-mix(in srgb,var(--sol-color-primary, #2563EB) 35%,transparent)}.swatch-picker{width:32px;height:28px;padding:0;background:transparent;border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);border-radius:var(--sol-border-radius-sm, 6px);cursor:pointer}.hex-input,.text-input,.font-select{background:var(--sol-input-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-input-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-input-radius, 6px);box-shadow:var(--sol-input-shadow, none);color:var(--sol-color-text-primary, #0F172A);outline:none}.hex-input{width:96px;height:32px;padding:0 var(--sol-space-sm, 8px);font-family:var(--sol-font-family-mono, ui-monospace, monospace);font-size:var(--sol-font-size-sm, 13px);text-transform:uppercase}.text-input,.font-select{width:100%;height:var(--sol-size-input-height, 36px);padding:0 var(--sol-space-sm, 10px);font:inherit}.font-select{max-width:280px;cursor:pointer}.hex-input:focus,.text-input:focus,.font-select:focus{border:var(--sol-input-focus-border, 1px solid var(--sol-color-primary, #2563EB));box-shadow:var(--sol-input-focus-ring, none)}.font-btn{padding:var(--sol-space-sm, 8px) var(--sol-space-md, 12px);font-size:var(--sol-font-size-base, 14px);background:var(--sol-bg-sunken, #F1F5F9);color:var(--sol-color-text-primary, #0F172A);border:var(--sol-border-width-default, 1px) solid transparent;border-radius:var(--sol-border-radius-md, 8px);cursor:pointer}.font-btn.active{border-color:var(--sol-color-primary, #2563EB);background:color-mix(in srgb,var(--sol-color-primary, #2563EB) 8%,transparent)}.segmented,.mode-tabs,.dir-grid{padding:3px;background:var(--sol-bg-sunken, #F1F5F9);border-radius:var(--sol-border-radius-md, 8px)}.segmented{display:flex;flex-wrap:wrap;gap:var(--sol-space-xs, 4px);width:fit-content;max-width:100%}.seg-btn,.mode-tab,.mode-toggle{min-height:32px;font-family:inherit;font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-secondary, #475569);background:transparent;border:none;border-radius:var(--sol-border-radius-md, 8px);cursor:pointer;transition:background var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.seg-btn{padding:5px 11px}.seg-btn.active,.mode-tab.active{background:var(--sol-bg-surface, #FFFFFF);color:var(--sol-color-primary, #2563EB);box-shadow:var(--sol-shadow-sm, none);font-weight:600}.seg-btn:focus-visible,.mode-tab:focus-visible,.swatch:focus-visible,.dir-cell:focus-visible,.font-btn:focus-visible,.mode-toggle:focus-visible{outline:2px solid var(--sol-color-primary, #2563EB);outline-offset:2px}.range{width:100%;accent-color:var(--sol-color-primary, #2563EB)}.mode-tabs-head{display:flex;flex-direction:column;gap:var(--sol-space-sm, 8px)}.mode-tabs{display:flex;gap:var(--sol-space-xs, 4px);border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0))}.mode-tab{flex:1;padding:7px 12px}.dir-grid{display:grid;grid-template-columns:repeat(3,32px);grid-auto-rows:32px;gap:var(--sol-space-xs, 4px);width:fit-content}.dir-cell{display:flex;align-items:center;justify-content:center;font-size:var(--sol-font-size-base, 14px);color:var(--sol-color-text-secondary, #475569);background:transparent;border:var(--sol-border-width-default, 1px) solid transparent;border-radius:var(--sol-border-radius-sm, 6px);cursor:pointer}.dir-cell.active{background:var(--sol-bg-surface, #FFFFFF);color:var(--sol-color-primary, #2563EB);border-color:var(--sol-color-primary, #2563EB);font-weight:700}.grid-divider{display:none;position:relative;align-self:stretch;width:var(--sol-space-lg, 24px);cursor:col-resize;touch-action:none;-webkit-user-select:none;user-select:none;outline:none}.grid-divider:before{content:\"\";position:absolute;top:0;bottom:0;left:50%;width:var(--sol-border-width-default, 1px);transform:translate(-50%);background:var(--sol-border-color-default, #E2E8F0)}.grid-divider__handle{position:sticky;top:calc(50dvh - var(--sol-space-lg, 24px));display:block;width:var(--sol-space-xs, 4px);height:calc(var(--sol-space-lg, 24px) * 2);margin:0 auto;border-radius:var(--sol-border-radius-full, 999px);background:var(--sol-color-text-muted, #64748B)}.grid-divider:hover .grid-divider__handle,.grid-divider:focus-visible .grid-divider__handle,.studio-grid.is-resizing .grid-divider__handle{background:var(--sol-color-primary, #2563EB)}.preview-pane{display:none;position:sticky;top:calc(var(--sol-size-header-height, 56px) + var(--sol-space-md, 16px));max-height:calc(100dvh - var(--sol-size-header-height, 56px) - var(--sol-space-xl, 32px));flex-direction:column;gap:var(--sol-space-sm, 8px);min-width:0;min-height:0;overflow:hidden;padding:var(--sol-space-md, 16px);background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);box-shadow:var(--sol-card-shadow, none)}.preview-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}.preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--sol-space-sm, 8px);margin-bottom:var(--sol-space-sm, 8px)}.mode-toggle{display:inline-flex;align-items:center;gap:var(--sol-space-xs, 4px);padding:5px 11px;background:var(--sol-bg-sunken, #F1F5F9);border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);border-radius:var(--sol-border-radius-full, 999px);white-space:nowrap}.preview-actions{display:flex;flex-wrap:wrap;gap:var(--sol-space-sm, 8px);padding-top:var(--sol-space-sm, 8px);border-top:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0)}.json-hint{flex-basis:100%}.preview-fab{position:fixed;right:var(--sol-space-sm, 8px);top:50%;z-index:calc(var(--sol-z-dropdown, 100) + 10);display:flex;align-items:center;justify-content:center;width:calc(var(--sol-size-control-touch, 44px) + var(--sol-space-sm, 8px));height:calc(var(--sol-size-control-touch, 44px) + var(--sol-space-sm, 8px));transform:translateY(-50%);border:none;border-radius:var(--sol-border-radius-full, 999px);background:var(--sol-color-primary, #2563EB);color:var(--sol-color-primary-contrast, #FFFFFF);box-shadow:var(--sol-shadow-lg, none);cursor:pointer}.preview-fab:focus-visible{outline:3px solid color-mix(in srgb,var(--sol-color-primary, #2563EB) 45%,transparent);outline-offset:2px}.confirm-message{margin:0 0 var(--sol-space-md, 16px);color:var(--sol-color-text-secondary, #475569)}.confirm-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--sol-space-sm, 8px)}@media(max-width:767px){.control-card{padding:var(--sol-space-md, 16px)}.seg-btn,.mode-tab,.mode-toggle,.swatch,.dir-cell{min-height:var(--sol-size-control-touch, 44px)}.swatch{min-width:var(--sol-size-control-touch, 44px)}.text-input,.hex-input,.font-select{font-size:var(--sol-font-size-touch-input, 16px)}}@media(min-width:1024px){.studio-grid{grid-template-columns:minmax(0,var(--studio-split)) var(--sol-space-lg, 24px) minmax(0,1fr);gap:0}.grid-divider{display:block}.preview-pane{display:flex}.preview-fab{display:none}}\n"] }]
|
|
4122
|
-
}], propDecorators: { baseTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseTheme", required: false }] }], metaExtras: [{ type: i0.Input, args: [{ isSignal: true, alias: "metaExtras", required: false }] }],
|
|
5185
|
+
`, styles: [":host{display:block}.studio{display:flex;flex-direction:column;gap:var(--sol-space-md, 16px);padding-bottom:var(--sol-space-xl, 32px);min-width:0}.studio-title,.card-title{margin:0;font-family:var(--sol-font-display, var(--sol-font-family, system-ui, sans-serif));font-weight:var(--sol-display-weight, 700);letter-spacing:var(--sol-display-tracking, 0em);text-transform:var(--sol-display-transform, none);color:var(--sol-color-text-primary, #0F172A)}.studio-title{font-size:var(--sol-font-size-xl, 20px)}.studio-subtitle{margin:4px 0 0;color:var(--sol-color-text-secondary, #475569);font-size:var(--sol-font-size-sm, 13px)}.state-panel{display:flex;flex-direction:column;align-items:center;gap:var(--sol-space-sm, 8px);padding:var(--sol-space-xl, 32px) var(--sol-space-md, 16px);text-align:center;background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);color:var(--sol-color-text-secondary, #475569)}.state-panel p{margin:0}.state-panel--error{color:var(--sol-color-danger, #DC2626)}.notice{margin:0;padding:var(--sol-space-sm, 8px) var(--sol-space-md, 12px);border-radius:var(--sol-border-radius-md, 8px);background:color-mix(in srgb,var(--sol-color-info, #0284C7) 10%,transparent);color:var(--sol-color-text-primary, #0F172A);font-size:var(--sol-font-size-sm, 13px)}.studio-grid{--studio-split: 60%;--studio-sticky-top: calc(var(--sol-size-header-height, 56px) + var(--sol-space-md, 16px));display:grid;grid-template-columns:minmax(0,1fr);gap:var(--sol-space-lg, 24px);align-items:start}.studio-grid.is-resizing{cursor:col-resize;user-select:none;-webkit-user-select:none}.controls{display:flex;flex-direction:column;gap:var(--sol-space-md, 16px);min-width:0}.grid-divider{display:none;position:relative;align-self:stretch;width:var(--sol-space-lg, 24px);cursor:col-resize;touch-action:none;user-select:none;-webkit-user-select:none;outline:none}.grid-divider:before{content:\"\";position:absolute;top:0;bottom:0;left:50%;width:var(--sol-border-width-default, 1px);transform:translate(-50%);background:var(--sol-border-color-default, #E2E8F0)}.grid-divider__handle{position:sticky;top:calc(50dvh - var(--sol-space-lg, 24px));display:block;width:var(--sol-space-xs, 4px);height:calc(var(--sol-space-lg, 24px) * 2);margin:0 auto;border-radius:var(--sol-border-radius-full, 999px);background:var(--sol-color-text-muted, #64748B);transition:background var(--sol-dur-fast, .12s) var(--sol-ease, ease),transform var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.grid-divider:hover .grid-divider__handle,.grid-divider:focus-visible .grid-divider__handle,.studio-grid.is-resizing .grid-divider__handle{background:var(--sol-color-primary, #2563EB);transform:scaleX(1.5)}.grid-divider:focus-visible .grid-divider__handle{box-shadow:0 0 0 3px color-mix(in srgb,var(--sol-color-primary, #2563EB) 30%,transparent)}.group-title{margin:var(--sol-space-sm, 8px) 0 0;font-size:var(--sol-font-size-sm, 13px);font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--sol-color-text-muted, #64748B)}.control-card{display:flex;flex-direction:column;gap:var(--sol-space-md, 16px);padding:var(--sol-space-lg, 24px);background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);box-shadow:var(--sol-card-shadow, none)}.card-title{font-size:var(--sol-font-size-lg, 16px)}.control-row{display:flex;flex-direction:column;gap:7px;min-width:0}.control-label{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-secondary, #475569)}.range-value{font-family:var(--sol-font-numeric, var(--sol-font-family, system-ui, sans-serif));color:var(--sol-color-text-primary, #0F172A)}.swatch-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.field-hint{margin:0;font-size:var(--sol-font-size-sm, 13px);color:var(--sol-color-text-muted, #64748B)}.logo-thumb{width:40px;height:40px;object-fit:contain;border-radius:var(--sol-border-radius-sm, 6px);border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #e5e7eb);background:var(--sol-bg-sunken, #f8fafc)}.swatch{width:26px;height:26px;border-radius:50%;border:2px solid var(--sol-border-color-default, #E2E8F0);cursor:pointer;padding:0}.swatch.active{border-color:var(--sol-color-primary, #2563EB);box-shadow:0 0 0 2px color-mix(in srgb,var(--sol-color-primary, #2563EB) 35%,transparent)}.swatch-picker{width:30px;height:26px;padding:0;border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);border-radius:var(--sol-border-radius-sm, 6px);background:transparent;cursor:pointer}.hex-input,.text-input{background:var(--sol-input-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-input-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-input-radius, 6px);box-shadow:var(--sol-input-shadow, none);color:var(--sol-color-text-primary, #0F172A);outline:none}.hex-input{width:92px;height:28px;padding:0 8px;font-family:var(--sol-font-family-mono, ui-monospace, monospace);font-size:var(--sol-font-size-sm, 13px);text-transform:uppercase}.text-input{width:100%;height:var(--sol-size-input-height, 36px);padding:0 10px;font:inherit}.hex-input:focus,.text-input:focus{border:var(--sol-input-focus-border, 1px solid var(--sol-color-primary, #2563EB));box-shadow:var(--sol-input-focus-ring, none)}.font-list{display:flex;gap:8px;flex-wrap:wrap}.font-btn{padding:8px 12px;font-size:15px;background:var(--sol-bg-sunken, #F1F5F9);color:var(--sol-color-text-primary, #0F172A);border:var(--sol-border-width-default, 1px) solid transparent;border-radius:var(--sol-border-radius-md, 8px);cursor:pointer}.font-btn.active{border-color:var(--sol-color-primary, #2563EB);background:color-mix(in srgb,var(--sol-color-primary, #2563EB) 8%,transparent)}.font-select{width:100%;max-width:280px;height:var(--sol-size-input-height, 36px);padding:0 10px;background:var(--sol-input-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-input-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-input-radius, 6px);box-shadow:var(--sol-input-shadow, none);color:var(--sol-color-text-primary, #0F172A);font-size:var(--sol-font-size-sm, 13px);outline:none;cursor:pointer}.font-select:focus{border:var(--sol-input-focus-border, 1px solid var(--sol-color-primary, #2563EB));box-shadow:var(--sol-input-focus-ring, none)}.segmented{display:flex;gap:4px;flex-wrap:wrap;padding:3px;background:var(--sol-bg-sunken, #F1F5F9);border-radius:var(--sol-border-radius-md, 8px);width:fit-content;max-width:100%}.seg-btn,.mode-tab{font-size:var(--sol-font-size-sm, 13px);font-family:inherit;background:transparent;color:var(--sol-color-text-secondary, #475569);border:none;border-radius:calc(var(--sol-border-radius-md, 8px) - 2px);cursor:pointer;transition:background var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.seg-btn.active,.mode-tab.active{background:var(--sol-bg-surface, #FFFFFF);color:var(--sol-color-primary, #2563EB);box-shadow:var(--sol-shadow-sm, none);font-weight:600}.seg-btn{padding:5px 11px}.seg-btn:focus-visible,.mode-tab:focus-visible,.swatch:focus-visible,.dir-cell:focus-visible,.font-btn:focus-visible,.mode-toggle:focus-visible{outline:2px solid var(--sol-color-primary, #2563EB);outline-offset:2px}.range{width:100%;accent-color:var(--sol-color-primary, #2563EB)}.mode-tabs-head{display:flex;flex-direction:column;gap:8px}.mode-tabs{display:flex;gap:4px;padding:3px;background:var(--sol-bg-sunken, #F1F5F9);border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-border-radius-md, 8px)}.mode-tab{flex:1;padding:7px 12px}.dir-grid{display:grid;grid-template-columns:repeat(3,30px);grid-auto-rows:30px;gap:4px;width:fit-content;padding:3px;background:var(--sol-bg-sunken, #F1F5F9);border-radius:var(--sol-border-radius-md, 8px)}.dir-cell{display:flex;align-items:center;justify-content:center;font-size:14px;line-height:1;background:transparent;color:var(--sol-color-text-secondary, #475569);border:var(--sol-border-width-default, 1px) solid transparent;border-radius:var(--sol-border-radius-sm, 6px);cursor:pointer;transition:background var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.dir-cell.active{background:var(--sol-bg-surface, #FFFFFF);color:var(--sol-color-primary, #2563EB);border-color:var(--sol-color-primary, #2563EB);font-weight:700}.history-panel{padding:var(--sol-space-4, 16px)}.history-list{list-style:none;padding:var(--sol-space-0, 0px)}.history-list li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--sol-space-4, 16px);padding-block:var(--sol-space-2, 8px)}.preview-pane{display:none;position:sticky;top:var(--studio-sticky-top);max-height:calc(100dvh - var(--studio-sticky-top) - var(--sol-theme-studio-bottom-inset, 0px) - var(--sol-space-md, 16px));flex-direction:column;gap:var(--sol-space-sm, 8px);padding:var(--sol-space-md, 16px);background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));border:var(--sol-card-border, 1px solid var(--sol-border-color-default, #E2E8F0));border-radius:var(--sol-card-radius, 12px);box-shadow:var(--sol-card-shadow, none);min-width:0;min-height:0;overflow:hidden}.preview-toolbar{flex:0 0 auto;display:flex;justify-content:space-between;align-items:center;gap:var(--sol-space-sm, 8px)}.preview-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}.mode-toggle{padding:5px 11px;font-size:var(--sol-font-size-sm, 13px);font-family:inherit;background:var(--sol-bg-sunken, #F1F5F9);color:var(--sol-color-text-secondary, #475569);border:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);border-radius:var(--sol-border-radius-full, 999px);cursor:pointer;white-space:nowrap}.json-file-hint{flex-basis:100%}.preview-actions{flex:0 0 auto;display:flex;gap:var(--sol-space-sm, 8px);flex-wrap:wrap;padding-top:var(--sol-space-sm, 8px);border-top:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0)}.studio-header{display:flex;justify-content:space-between;align-items:center}.preview-fab{position:fixed;right:var(--sol-space-sm, 8px);top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:calc(var(--sol-size-control-touch, 44px) + var(--sol-space-sm, 8px));height:calc(var(--sol-size-control-touch, 44px) + var(--sol-space-sm, 8px));border:none;border-radius:var(--sol-border-radius-full, 999px);background:var(--sol-color-primary, #2563EB);color:var(--sol-color-primary-contrast, #FFFFFF);cursor:pointer;z-index:calc(var(--sol-z-dropdown, 100) + 10);box-shadow:var(--sol-shadow-lg, none),0 0 0 4px color-mix(in srgb,var(--sol-color-primary, #2563EB) 25%,transparent);transition:transform var(--sol-dur-fast, .12s) var(--sol-ease, ease),box-shadow var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.preview-fab:active{transform:translateY(-50%) scale(.94)}.preview-fab:focus-visible{outline:none;box-shadow:var(--sol-shadow-lg, none),0 0 0 4px color-mix(in srgb,var(--sol-color-primary, #2563EB) 45%,transparent)}.preview-slide-over{position:fixed;inset:0;z-index:var(--sol-z-modal, 1000)}.slide-over-backdrop{position:absolute;inset:0;background:var(--sol-bg-overlay, rgba(0, 0, 0, .5));backdrop-filter:var(--sol-overlay-blur, blur(3px));-webkit-backdrop-filter:var(--sol-overlay-blur, blur(3px));animation:studioFadeIn var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.slide-over-panel{position:absolute;top:0;right:0;bottom:0;width:min(100vw,520px);display:flex;flex-direction:column;min-height:0;background:var(--sol-card-bg, var(--sol-bg-surface, #FFFFFF));box-shadow:var(--sol-shadow-lg, none);animation:studioSlideIn var(--sol-dur-normal) var(--sol-ease, ease)}@keyframes studioSlideIn{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes studioFadeIn{0%{opacity:0}to{opacity:1}}.slide-over-header{flex:0 0 auto;display:flex;align-items:center;gap:var(--sol-space-sm, 8px);padding:var(--sol-space-md, 16px);padding-top:calc(var(--sol-space-md, 16px) + env(safe-area-inset-top,0px));border-bottom:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0)}.slide-over-header .card-title{flex:1 1 auto;min-width:0;font-size:var(--sol-font-size-lg, 16px)}.slide-over-header .mode-toggle,.close-btn{min-height:var(--sol-size-control-touch, 44px)}.close-btn{display:flex;align-items:center;justify-content:center;min-width:var(--sol-size-control-touch, 44px);padding:0;background:transparent;border:none;border-radius:var(--sol-border-radius-md, 8px);color:var(--sol-color-text-secondary, #475569);cursor:pointer;transition:background var(--sol-dur-fast, .12s) var(--sol-ease, ease),color var(--sol-dur-fast, .12s) var(--sol-ease, ease)}.close-btn:hover{background:var(--sol-bg-sunken, #F1F5F9);color:var(--sol-color-text-primary, #0F172A)}.slide-over-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:var(--sol-space-md, 16px)}.slide-over-footer{flex:0 0 auto;display:flex;gap:var(--sol-space-sm, 8px);flex-wrap:wrap;padding:var(--sol-space-md, 16px);padding-bottom:calc(var(--sol-space-md, 16px) + env(safe-area-inset-bottom,0px));border-top:var(--sol-border-width-default, 1px) solid var(--sol-border-color-default, #E2E8F0);background:var(--sol-bg-sunken, #F1F5F9)}@media(min-width:1024px){.studio-grid{grid-template-columns:minmax(0,var(--studio-split)) var(--sol-space-lg, 24px) minmax(0,1fr);gap:0}.grid-divider{display:block}.preview-pane{display:flex}.preview-fab,.preview-slide-over{display:none}}@media(prefers-reduced-motion:reduce){.slide-over-backdrop,.slide-over-panel{animation:none}}\n"] }]
|
|
5186
|
+
}], propDecorators: { baseTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseTheme", required: false }] }], metaExtras: [{ type: i0.Input, args: [{ isSignal: true, alias: "metaExtras", required: false }] }], metaExtrasSchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "metaExtrasSchema", required: false }] }], features: [{ type: i0.Input, args: [{ isSignal: true, alias: "features", required: false }] }], footerPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerPlaceholder", required: false }] }], exportFileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportFileName", required: false }] }], versionTimeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "versionTimeZone", required: false }] }], versionTimeZoneLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "versionTimeZoneLabel", required: false }] }], applied: [{ type: i0.Output, args: ["applied"] }], notify: [{ type: i0.Output, args: ["notify"] }], gridContainer: [{ type: i0.ViewChild, args: ['gridContainer', { isSignal: true }] }] } });
|
|
4123
5187
|
|
|
4124
5188
|
/*
|
|
4125
5189
|
* Public API Surface of @solercia/ui/theme-studio
|
|
@@ -4132,5 +5196,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
4132
5196
|
* Generated bundle index. Do not edit.
|
|
4133
5197
|
*/
|
|
4134
5198
|
|
|
4135
|
-
export { BASE_SIZE_MAX, BASE_SIZE_MIN, DEFAULT_DARK_MODE_FORM, DEFAULT_LIGHT_MODE_FORM, DEFAULT_STUDIO_FORM, DEFAULT_TABLE_VARIANT, HEX_COLOR_PATTERN, LINE_HEIGHT_MAX, LINE_HEIGHT_MIN, MAX_THEME_JSON_BYTES, RADIUS_MAX, RADIUS_MIN, SERIF_DISPLAY_FONTS, SOL_THEME_STUDIO_I18N_EN, SOL_THEME_STUDIO_I18N_ES_CO, STUDIO_BODY_FONTS, STUDIO_BODY_FONTS_QUICK, STUDIO_COLOR_SUGGESTIONS_DARK, STUDIO_COLOR_SUGGESTIONS_LIGHT, STUDIO_DISPLAY_FONTS, STUDIO_DISPLAY_FONTS_QUICK, STUDIO_SHADOW_COLOR_SUGGESTIONS, STUDIO_SHADOW_DIRECTIONS, STUDIO_TEXTURE_COLOR_SUGGESTIONS, STUDIO_TEXT_COLOR_SUGGESTIONS_DARK, STUDIO_TEXT_COLOR_SUGGESTIONS_LIGHT, SolThemeStudioComponent, SolThemeStudioPreviewComponent, THEME_STUDIO_I18N_PREFIX, THEME_STUDIO_STORE, ThemeImportError, buildThemeFile, cloneStudioForm, deepMerge, mapThemeFileToForm, mergeThemeEditorChanges, parseThemeJson };
|
|
5199
|
+
export { BASE_SIZE_MAX, BASE_SIZE_MIN, DEFAULT_DARK_MODE_FORM, DEFAULT_LIGHT_MODE_FORM, DEFAULT_LOADER_CONFIG, DEFAULT_STUDIO_FORM, DEFAULT_TABLE_VARIANT, HEX_COLOR_PATTERN, LINE_HEIGHT_MAX, LINE_HEIGHT_MIN, MAX_THEME_JSON_BYTES, RADIUS_MAX, RADIUS_MIN, SERIF_DISPLAY_FONTS, SOL_THEME_STUDIO_I18N_EN, SOL_THEME_STUDIO_I18N_ES_CO, STUDIO_BODY_FONTS, STUDIO_BODY_FONTS_QUICK, STUDIO_COLOR_SUGGESTIONS_DARK, STUDIO_COLOR_SUGGESTIONS_LIGHT, STUDIO_DISPLAY_FONTS, STUDIO_DISPLAY_FONTS_QUICK, STUDIO_LOADER_ANIMATIONS, STUDIO_LOADER_PRESENTATIONS, STUDIO_SHADOW_COLOR_SUGGESTIONS, STUDIO_SHADOW_DIRECTIONS, STUDIO_TEXTURE_COLOR_SUGGESTIONS, STUDIO_TEXT_COLOR_SUGGESTIONS_DARK, STUDIO_TEXT_COLOR_SUGGESTIONS_LIGHT, SolThemeStudioComponent, SolThemeStudioPreviewComponent, THEME_STUDIO_I18N_PREFIX, THEME_STUDIO_STORE, ThemeImportError, buildThemeFile, cloneStudioForm, deepMerge, extractStoreErrorMessage, mapThemeFileToForm, mergeThemeEditorChanges, parseThemeJson };
|
|
4136
5200
|
//# sourceMappingURL=solercia-ui-theme-studio.mjs.map
|