@edc-motor/ui 0.4.24 → 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",
|
|
@@ -342,8 +342,10 @@
|
|
|
342
342
|
.block__index-level-2 { font-size: 22px; }
|
|
343
343
|
.block__index-level-3 { font-size: $fs-20; }
|
|
344
344
|
|
|
345
|
-
// Entradas
|
|
346
|
-
.
|
|
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}); }
|
|
347
349
|
}
|
|
348
350
|
|
|
349
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,12 @@ 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">
|
|
17
|
-
<!--
|
|
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). -->
|
|
18
20
|
<li
|
|
19
21
|
v-for="item in data.items ?? []"
|
|
20
22
|
:key="item.id"
|
|
23
|
+
:style="{ '--depth': item.depth ?? 0 }"
|
|
21
24
|
:class="[
|
|
22
25
|
`block__index-level-${Math.min((item.depth ?? 0) + 1, 3)}`,
|
|
23
26
|
{ 'block__index-child': (item.depth ?? 0) > 0 },
|