@edc-motor/ui 0.4.19 → 0.4.20
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.20",
|
|
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",
|
|
@@ -28,6 +28,16 @@
|
|
|
28
28
|
&--align-justify &__title,
|
|
29
29
|
&--align-justify &__subtitle { text-align: left; }
|
|
30
30
|
|
|
31
|
+
// Alineación PROPIA de título/subtítulo (campos comunes title_align y
|
|
32
|
+
// 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; }
|
|
40
|
+
|
|
31
41
|
&__label {
|
|
32
42
|
display: inline-block;
|
|
33
43
|
justify-self: start;
|
|
@@ -222,23 +232,28 @@
|
|
|
222
232
|
border-radius: 0 0 $radius-lg $radius-lg;
|
|
223
233
|
}
|
|
224
234
|
|
|
235
|
+
// Cita: sin adorno de borde, en GRANDE ($fs-32, el token más cercano a
|
|
236
|
+
// los ~40px pedidos) y del color de acento.
|
|
225
237
|
&--quote .block__quote {
|
|
226
238
|
margin: 0;
|
|
227
|
-
border-left: 3px solid $accent-500;
|
|
228
|
-
padding-left: $space-4;
|
|
229
239
|
// Fuente "especial" de la configuración de la web (doc 10); las fuentes
|
|
230
240
|
// decorativas piden un cuerpo mayor.
|
|
231
241
|
font-family: var(--font-special, inherit);
|
|
232
|
-
font-size: $fs-
|
|
242
|
+
font-size: $fs-32;
|
|
233
243
|
font-style: italic;
|
|
244
|
+
color: $accent-500;
|
|
234
245
|
}
|
|
235
246
|
&__author {
|
|
236
247
|
margin-top: $space-2;
|
|
237
248
|
color: $text-3;
|
|
238
249
|
// El autor no hereda la fuente especial de la cita.
|
|
239
250
|
font-family: var(--font-body, inherit);
|
|
240
|
-
font-style:
|
|
251
|
+
font-style: italic;
|
|
241
252
|
font-size: $fs-14;
|
|
253
|
+
|
|
254
|
+
&--left { text-align: left; }
|
|
255
|
+
&--center { text-align: center; }
|
|
256
|
+
&--right { text-align: right; }
|
|
242
257
|
}
|
|
243
258
|
}
|
|
244
259
|
|
|
@@ -12,7 +12,13 @@ defineProps<{ settings: Record<string, unknown>; data?: Record<string, unknown>
|
|
|
12
12
|
<blockquote class="block__quote">
|
|
13
13
|
<img v-if="settings.image" class="block__avatar" :src="String(settings.image)" alt="" />
|
|
14
14
|
<div class="rich-content" v-html="settings.quote" />
|
|
15
|
-
<footer
|
|
15
|
+
<footer
|
|
16
|
+
v-if="settings.author"
|
|
17
|
+
class="block__author"
|
|
18
|
+
:class="`block__author--${settings.author_align || 'left'}`"
|
|
19
|
+
>
|
|
20
|
+
— {{ settings.author }}
|
|
21
|
+
</footer>
|
|
16
22
|
</blockquote>
|
|
17
23
|
</BlockShell>
|
|
18
24
|
</template>
|
|
@@ -12,6 +12,13 @@ const width = computed(() => `block--w-${(props.settings.width as string) || 'wi
|
|
|
12
12
|
// Sin valor guardado, JUSTIFICADO (el default del campo común del motor).
|
|
13
13
|
const align = computed(() => `block--align-${(props.settings.align as string) || 'justify'}`)
|
|
14
14
|
|
|
15
|
+
// Alineación propia de título/subtítulo (campos comunes): solo pinta clase
|
|
16
|
+
// con un valor explícito — "inherit" (o nada) deja mandar a la del bloque.
|
|
17
|
+
const headingAlign = (key: 'title_align' | 'subtitle_align', prefix: string) => {
|
|
18
|
+
const value = props.settings[key] as string | undefined
|
|
19
|
+
return value && value !== 'inherit' ? `block--${prefix}-${value}` : ''
|
|
20
|
+
}
|
|
21
|
+
|
|
15
22
|
const style = computed<CSSProperties>(() => {
|
|
16
23
|
const background = props.settings.background as string | undefined
|
|
17
24
|
return {
|
|
@@ -24,7 +31,11 @@ const style = computed<CSSProperties>(() => {
|
|
|
24
31
|
</script>
|
|
25
32
|
|
|
26
33
|
<template>
|
|
27
|
-
<section
|
|
34
|
+
<section
|
|
35
|
+
class="block"
|
|
36
|
+
:class="[width, align, headingAlign('title_align', 'title'), headingAlign('subtitle_align', 'subtitle')]"
|
|
37
|
+
:style="style"
|
|
38
|
+
>
|
|
28
39
|
<div class="block__inner">
|
|
29
40
|
<slot />
|
|
30
41
|
</div>
|