@edc-motor/ui 0.4.21 → 0.4.23

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.21",
3
+ "version": "0.4.23",
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
- &__title { margin: 0; font-size: $fs-28; }
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
- &--title-left &__title { text-align: left; }
35
- &--title-center &__title { text-align: center; }
36
- &--title-right &__title { text-align: right; }
37
- &--subtitle-left &__subtitle { text-align: left; }
38
- &--subtitle-center &__subtitle { text-align: center; }
39
- &--subtitle-right &__subtitle { text-align: right; }
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 {
@@ -246,6 +307,10 @@
246
307
  font-size: $fs-32;
247
308
  font-style: italic;
248
309
  color: $accent-500;
310
+
311
+ // La cita llega como richtext y .rich-content fija su propio cuerpo
312
+ // ($fs-16): aquí debe heredar el tamaño grande de la cita.
313
+ .rich-content { font-size: inherit; }
249
314
  }
250
315
  &__author {
251
316
  margin-top: $space-2;
@@ -15,9 +15,9 @@ defineProps<{ settings: Record<string, unknown>; data?: Record<string, unknown>
15
15
  <footer
16
16
  v-if="settings.author"
17
17
  class="block__author"
18
- :class="`block__author--${settings.author_align || 'left'}`"
18
+ :class="`block__author--${settings.author_align || 'right'}`"
19
19
  >
20
- {{ settings.author }}
20
+ {{ settings.author }}
21
21
  </footer>
22
22
  </blockquote>
23
23
  </BlockShell>