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