@edc-motor/ui 0.4.23 → 0.4.25
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edc-motor/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.25",
|
|
4
4
|
"description": "EdC Motor — componentes públicos Vue 3 + tokens SCSS para webs de juegos de mesa (paquete fuente: lo compila el consumidor con Vite)",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"type": "module",
|
|
@@ -306,6 +306,7 @@
|
|
|
306
306
|
font-family: var(--font-special, inherit);
|
|
307
307
|
font-size: $fs-32;
|
|
308
308
|
font-style: italic;
|
|
309
|
+
font-weight: $k-fw-semibold;
|
|
309
310
|
color: $accent-500;
|
|
310
311
|
|
|
311
312
|
// La cita llega como richtext y .rich-content fija su propio cuerpo
|
|
@@ -331,12 +332,20 @@
|
|
|
331
332
|
padding-left: 1.2em;
|
|
332
333
|
display: grid;
|
|
333
334
|
gap: $space-1;
|
|
335
|
+
font-weight: $k-fw-medium;
|
|
334
336
|
|
|
335
337
|
a { color: $accent-500; text-decoration: none; }
|
|
336
338
|
a:hover { text-decoration: underline; }
|
|
337
339
|
|
|
338
|
-
//
|
|
339
|
-
.block__index-
|
|
340
|
+
// Tamaño por nivel: 24 → 22 (sin token entre 20 y 24) → 20 (3 o más).
|
|
341
|
+
.block__index-level-1 { font-size: $fs-24; }
|
|
342
|
+
.block__index-level-2 { font-size: 22px; }
|
|
343
|
+
.block__index-level-3 { font-size: $fs-20; }
|
|
344
|
+
|
|
345
|
+
// Entradas anidadas: sangría POR NIVEL (profundidad real, sin límite) —
|
|
346
|
+
// `--depth` lo pone BlockIndex.vue en línea; el tamaño de letra sí se
|
|
347
|
+
// limita a 3 niveles (block__index-level-1/2/3, el 3 agrupa "3 o más").
|
|
348
|
+
.block__index-child { margin-left: calc(var(--depth, 1) * #{$space-5}); }
|
|
340
349
|
}
|
|
341
350
|
|
|
342
351
|
// FAQ (doc 03): acordeón nativo details/summary del bloque `faq`.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import BlockShell from './BlockShell.vue'
|
|
3
3
|
|
|
4
|
-
// Índice automático: enlaces de ancla a los bloques posteriores de la
|
|
5
|
-
// con sangría por nivel (
|
|
4
|
+
// Índice automático: enlaces de ancla a los bloques posteriores de la
|
|
5
|
+
// página, con sangría por nivel (sin límite de profundidad: la escribe
|
|
6
|
+
// IndexBlock::resolveData subiendo por la cadena de padres del bloque).
|
|
6
7
|
defineProps<{
|
|
7
8
|
settings: Record<string, unknown>
|
|
8
9
|
data: { items?: { id: number; label: string; depth?: number }[] }
|
|
@@ -14,10 +15,16 @@ defineProps<{
|
|
|
14
15
|
<h2 v-if="settings.title" class="block__title">{{ settings.title }}</h2>
|
|
15
16
|
<p v-if="settings.subtitle" class="block__subtitle">{{ settings.subtitle }}</p>
|
|
16
17
|
<component :is="settings.numbered ? 'ol' : 'ul'" class="block__index">
|
|
18
|
+
<!-- Tamaño por nivel (24/22/20, el 3 agrupa "3 o más"); la SANGRÍA, en
|
|
19
|
+
cambio, escala con la profundidad real (--depth, sin tope). -->
|
|
17
20
|
<li
|
|
18
21
|
v-for="item in data.items ?? []"
|
|
19
22
|
:key="item.id"
|
|
20
|
-
:
|
|
23
|
+
:style="{ '--depth': item.depth ?? 0 }"
|
|
24
|
+
:class="[
|
|
25
|
+
`block__index-level-${Math.min((item.depth ?? 0) + 1, 3)}`,
|
|
26
|
+
{ 'block__index-child': (item.depth ?? 0) > 0 },
|
|
27
|
+
]"
|
|
21
28
|
>
|
|
22
29
|
<a :href="`#block-${item.id}`">{{ item.label }}</a>
|
|
23
30
|
</li>
|