@edc-motor/ui 0.4.22 → 0.4.24
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.24",
|
|
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",
|
|
@@ -20,9 +20,11 @@
|
|
|
20
20
|
|
|
21
21
|
// Tipografía de bloque: texto $fs-16, subtítulo $fs-20, título $fs-28
|
|
22
22
|
// (la cabecera sube a 32/24). Los títulos nunca se justifican.
|
|
23
|
-
|
|
23
|
+
// width 100%: en grids con justify-items start (el cuerpo del CTA) el
|
|
24
|
+
// elemento encoge a su contenido y el text-align no se vería.
|
|
25
|
+
&__title { margin: 0; font-size: $fs-28; width: 100%; }
|
|
24
26
|
// pre-line: el subtítulo es un textarea — sus saltos de línea cuentan.
|
|
25
|
-
&__subtitle { margin: 0; color: $text-2; font-size: $fs-20; white-space: pre-line; }
|
|
27
|
+
&__subtitle { margin: 0; color: $text-2; font-size: $fs-20; white-space: pre-line; width: 100%; }
|
|
26
28
|
&__text { color: $text-1; font-size: $fs-16; }
|
|
27
29
|
|
|
28
30
|
&--align-justify &__title,
|
|
@@ -30,13 +32,25 @@
|
|
|
30
32
|
|
|
31
33
|
// Alineación PROPIA de título/subtítulo (campos comunes title_align y
|
|
32
34
|
// subtitle_align): con valor explícito manda sobre la del bloque (por eso
|
|
33
|
-
// va DESPUÉS del ajuste del justificado).
|
|
34
|
-
|
|
35
|
-
&--title-
|
|
36
|
-
&--title-
|
|
37
|
-
&--
|
|
38
|
-
&--subtitle-
|
|
39
|
-
&--subtitle-
|
|
35
|
+
// va DESPUÉS del ajuste del justificado). En ESTRECHO se revierte a la
|
|
36
|
+
// izquierda, se haya elegido lo que se haya elegido.
|
|
37
|
+
&--title-left &__title,
|
|
38
|
+
&--title-center &__title,
|
|
39
|
+
&--title-right &__title,
|
|
40
|
+
&--subtitle-left &__subtitle,
|
|
41
|
+
&--subtitle-center &__subtitle,
|
|
42
|
+
&--subtitle-right &__subtitle {
|
|
43
|
+
text-align: left;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@media (min-width: $bp-sm) {
|
|
47
|
+
&--title-left &__title { text-align: left; }
|
|
48
|
+
&--title-center &__title { text-align: center; }
|
|
49
|
+
&--title-right &__title { text-align: right; }
|
|
50
|
+
&--subtitle-left &__subtitle { text-align: left; }
|
|
51
|
+
&--subtitle-center &__subtitle { text-align: center; }
|
|
52
|
+
&--subtitle-right &__subtitle { text-align: right; }
|
|
53
|
+
}
|
|
40
54
|
|
|
41
55
|
&__label {
|
|
42
56
|
display: inline-block;
|
|
@@ -236,6 +250,53 @@
|
|
|
236
250
|
border-radius: 0 0 $radius-lg $radius-lg;
|
|
237
251
|
}
|
|
238
252
|
|
|
253
|
+
// CTA con imagen en ESTRECHO: da igual la posición elegida — la imagen va
|
|
254
|
+
// ARRIBA, a sangre por los laterales de la tarjeta y con proporción 2:1
|
|
255
|
+
// (recortada, no deformada). Va DESPUÉS de las reglas por posición para
|
|
256
|
+
// ganarles en el empate de especificidad.
|
|
257
|
+
@container content (max-width: #{$bp-sm}) {
|
|
258
|
+
&--cta[class*="block--image-"] .block__card .block__media-layout {
|
|
259
|
+
> .block__image,
|
|
260
|
+
> .block__image-frame {
|
|
261
|
+
order: -1;
|
|
262
|
+
justify-self: stretch;
|
|
263
|
+
display: block; // el marco es un span: inline dejaría hueco de línea
|
|
264
|
+
width: calc(100% + #{$space-8 * 2});
|
|
265
|
+
max-width: none;
|
|
266
|
+
margin: 0 (-$space-8);
|
|
267
|
+
border-radius: 0;
|
|
268
|
+
overflow: hidden;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
> .block__image {
|
|
272
|
+
aspect-ratio: 2 / 1;
|
|
273
|
+
object-fit: cover;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// En columnas la imagen vive dentro del marco: la proporción la pone
|
|
277
|
+
// la propia imagen y el marco (estático en estrecho) la acompaña.
|
|
278
|
+
> .block__image-frame .block__image {
|
|
279
|
+
display: block; // inline dejaría el hueco de línea bajo la imagen
|
|
280
|
+
width: 100%;
|
|
281
|
+
height: auto;
|
|
282
|
+
max-width: none;
|
|
283
|
+
aspect-ratio: 2 / 1;
|
|
284
|
+
object-fit: cover;
|
|
285
|
+
border-radius: 0;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// Sin título encima (el media-layout abre la tarjeta): también a sangre
|
|
290
|
+
// por arriba, siguiendo el radio de la tarjeta.
|
|
291
|
+
&--cta[class*="block--image-"] .block__card > .block__media-layout:first-child {
|
|
292
|
+
> .block__image,
|
|
293
|
+
> .block__image-frame {
|
|
294
|
+
margin-top: -$space-8;
|
|
295
|
+
border-radius: $radius-lg $radius-lg 0 0;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
239
300
|
// Cita: sin adorno de borde, en GRANDE ($fs-32, el token más cercano a
|
|
240
301
|
// los ~40px pedidos) y del color de acento.
|
|
241
302
|
&--quote .block__quote {
|
|
@@ -245,6 +306,7 @@
|
|
|
245
306
|
font-family: var(--font-special, inherit);
|
|
246
307
|
font-size: $fs-32;
|
|
247
308
|
font-style: italic;
|
|
309
|
+
font-weight: $k-fw-semibold;
|
|
248
310
|
color: $accent-500;
|
|
249
311
|
|
|
250
312
|
// La cita llega como richtext y .rich-content fija su propio cuerpo
|
|
@@ -270,10 +332,16 @@
|
|
|
270
332
|
padding-left: 1.2em;
|
|
271
333
|
display: grid;
|
|
272
334
|
gap: $space-1;
|
|
335
|
+
font-weight: $k-fw-medium;
|
|
273
336
|
|
|
274
337
|
a { color: $accent-500; text-decoration: none; }
|
|
275
338
|
a:hover { text-decoration: underline; }
|
|
276
339
|
|
|
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
|
+
|
|
277
345
|
// Entradas de bloques hijos: sangradas bajo su padre.
|
|
278
346
|
.block__index-child { margin-left: $space-5; }
|
|
279
347
|
}
|
|
@@ -14,10 +14,14 @@ defineProps<{
|
|
|
14
14
|
<h2 v-if="settings.title" class="block__title">{{ settings.title }}</h2>
|
|
15
15
|
<p v-if="settings.subtitle" class="block__subtitle">{{ settings.subtitle }}</p>
|
|
16
16
|
<component :is="settings.numbered ? 'ol' : 'ul'" class="block__index">
|
|
17
|
+
<!-- Nivel visual por profundidad (tamaños decrecientes; 3 = 3 o más) -->
|
|
17
18
|
<li
|
|
18
19
|
v-for="item in data.items ?? []"
|
|
19
20
|
:key="item.id"
|
|
20
|
-
:class="
|
|
21
|
+
:class="[
|
|
22
|
+
`block__index-level-${Math.min((item.depth ?? 0) + 1, 3)}`,
|
|
23
|
+
{ 'block__index-child': (item.depth ?? 0) > 0 },
|
|
24
|
+
]"
|
|
21
25
|
>
|
|
22
26
|
<a :href="`#block-${item.id}`">{{ item.label }}</a>
|
|
23
27
|
</li>
|