libreria-astro-lefebvre 0.1.5 → 0.1.9

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": "libreria-astro-lefebvre",
3
- "version": "0.1.5",
3
+ "version": "0.1.9",
4
4
  "description": "Librería de componentes Astro, React y Vue para Lefebvre",
5
5
  "author": "Equipo web desarrollo Lefebvre",
6
6
  "type": "module",
@@ -0,0 +1,149 @@
1
+ import type { ComponentMetadata } from '../interfaces/types';
2
+
3
+ export const metadata: ComponentMetadata = {
4
+ component_name: 'Contenido_2026_Moraira',
5
+ category: 'Contenido de Imagen',
6
+ name: 'Banner CTA con imagen de fondo y overlay translúcido para legibilidad del texto',
7
+ description: 'Banner CTA con dos variantes alternativas según el toggle "Mostrar imagen" y si hay imagen. Variante 1 (imagen activada y URL rellena): imagen de fondo cover con texto oscuro (#262626/#363942) superpuesto. Si se marca "Imagen oscura", el bloque de texto aparece dentro de una caja translúcida blanca al 50% con backdrop-blur para garantizar legibilidad; si no, el texto va directamente sobre la imagen (apto para imágenes claras). Variante 2 (imagen desactivada o URL vacía): layout alternativo con borde degradado corporativo y fondo blanco. Incluye botón primario configurable y botón secundario que abre modal con formulario LF2 inyectado dinámicamente',
8
+ framework: 'Astro',
9
+ priority: 1,
10
+ tags: ['contenido', 'imagen', 'banner', 'cta', 'boton', 'modal', 'formulario', 'lf2', 'overlay', 'backdrop-blur'],
11
+ fields: [
12
+ {
13
+ name: 'title',
14
+ type: 'text',
15
+ help: 'Título principal del banner (h3). Si se deja vacío, NO se muestra. No admite HTML',
16
+ label: 'Texto del título',
17
+ mandatory: false,
18
+ example_value: 'Prueba GenIA-L gratis'
19
+ },
20
+ {
21
+ name: 'description',
22
+ type: 'text',
23
+ help: 'Descripción que aparece debajo del título. Admite HTML. Si se deja vacía, NO se muestra. Si tanto título como descripción están vacíos, el contenido se centra verticalmente con el botón',
24
+ label: 'Texto de la descripción',
25
+ mandatory: false,
26
+ example_value: 'Descubre cómo la IA jurídica transforma tu día a día'
27
+ },
28
+ {
29
+ name: 'showBtn',
30
+ type: 'boolean',
31
+ help: 'Activa o desactiva el botón primario. Recuerda: también requiere "Enlace del botón" relleno; si está vacío el botón no aparece',
32
+ label: 'Mostrar botón',
33
+ mandatory: false,
34
+ options: ['false', 'true'],
35
+ options_labels: ['Falso', 'Verdadero'],
36
+ example_value: true
37
+ },
38
+ {
39
+ name: 'txtBtn',
40
+ type: 'text',
41
+ help: 'Texto del botón primario. Solo se muestra si "Mostrar botón" está activado Y "Enlace del botón" tiene valor',
42
+ label: 'Label del botón',
43
+ mandatory: false,
44
+ example_value: 'Solicita una demo'
45
+ },
46
+ {
47
+ name: 'linkBtn',
48
+ type: 'text',
49
+ help: 'URL de destino del botón primario. Si se deja vacío, el botón NO aparece aunque "Mostrar botón" esté activado',
50
+ label: 'Enlace del botón',
51
+ mandatory: false,
52
+ example_value: '/genia-l/demo'
53
+ },
54
+ {
55
+ name: 'showImage',
56
+ type: 'boolean',
57
+ help: 'Activa/desactiva la imagen de fondo. Si ESTÁ ACTIVADO y "Imagen" tiene valor → layout con imagen de fondo cover y caja translúcida blanca con blur detrás del texto para garantizar legibilidad. Si ESTÁ DESACTIVADO o "Imagen" vacía → layout alternativo con borde degradado corporativo y fondo blanco',
58
+ label: 'Mostrar imagen',
59
+ mandatory: false,
60
+ options: ['false', 'true'],
61
+ options_labels: ['Falso', 'Verdadero'],
62
+ example_value: true
63
+ },
64
+ {
65
+ name: 'src',
66
+ type: 'image',
67
+ help: 'URL de la imagen de fondo. Solo se usa cuando "Mostrar imagen" está activado. Si se deja vacía, se activa el layout alternativo con borde degradado',
68
+ label: 'Imagen',
69
+ mandatory: false,
70
+ example_value: 'https://assets.lefebvre.es/media/img/preview-comp/comp-w-3-4.png'
71
+ },
72
+ {
73
+ name: 'darkImage',
74
+ type: 'boolean',
75
+ help: 'Marca SI la imagen de fondo es oscura. Si está ACTIVADO → se muestra una caja translúcida blanca con blur detrás del texto para garantizar la legibilidad del texto oscuro sobre la imagen. Si está DESACTIVADO → el texto se muestra directamente sobre la imagen (recomendado solo si la imagen es clara). Solo afecta a la variante con imagen',
76
+ label: 'Imagen oscura',
77
+ mandatory: false,
78
+ options: ['false', 'true'],
79
+ options_labels: ['Falso', 'Verdadero'],
80
+ example_value: false
81
+ },
82
+ {
83
+ name: 'showBtnModal',
84
+ type: 'boolean',
85
+ help: 'Activa o desactiva el segundo botón que abre un modal con información adicional. Se puede combinar con el botón primario o usarse en su lugar',
86
+ label: 'Mostrar botón modal',
87
+ mandatory: false,
88
+ options: ['false', 'true'],
89
+ options_labels: ['Falso', 'Verdadero'],
90
+ example_value: false
91
+ },
92
+ {
93
+ name: 'txtBtnModal',
94
+ type: 'text',
95
+ help: 'Texto del botón que abre el modal. Solo se muestra si "Mostrar botón modal" está activado',
96
+ label: 'Texto del botón de modal',
97
+ mandatory: false,
98
+ example_value: 'Más información'
99
+ },
100
+ {
101
+ name: 'imageModal',
102
+ type: 'image',
103
+ help: 'Imagen que se muestra dentro del modal al abrirlo. Solo se usa si "Mostrar botón modal" está activado',
104
+ label: 'Imagen del modal',
105
+ mandatory: false,
106
+ example_value: 'https://assets.lefebvre.es/media/img/preview-comp/comp-w-4-3.png'
107
+ },
108
+ {
109
+ name: 'altModal',
110
+ type: 'text',
111
+ help: 'Texto alternativo de la imagen del modal para accesibilidad. Solo aplica si el modal tiene imagen',
112
+ label: 'Alt de la imagen del modal',
113
+ mandatory: false,
114
+ example_value: 'Captura de la interfaz de GenIA-L con el panel de automatización'
115
+ },
116
+ {
117
+ name: 'titleModal',
118
+ type: 'text',
119
+ help: 'Título que aparece dentro del modal',
120
+ label: 'Título del modal',
121
+ mandatory: false,
122
+ example_value: 'Más sobre GenIA-L'
123
+ },
124
+ {
125
+ name: 'descriptionModal',
126
+ type: 'text',
127
+ help: 'Descripción que aparece dentro del modal',
128
+ label: 'Descripción del modal',
129
+ mandatory: false,
130
+ example_value: 'Descubre todas las funcionalidades de la plataforma de IA jurídica para despachos'
131
+ },
132
+ {
133
+ name: 'lf2FormTitle',
134
+ type: 'text',
135
+ help: 'Nombre del formulario de LF2 asociado al modal (para integraciones internas). Dejar vacío si no hay formulario',
136
+ label: 'Nombre del formulario LF2',
137
+ mandatory: false,
138
+ example_value: 'formulario-contacto-genial'
139
+ },
140
+ {
141
+ name: 'idebook',
142
+ type: 'text',
143
+ help: 'ID del ebook, whitepaper o documento registrado en BI con formato EXXXXXXX para pasar como parámetro oculto al formulario de LF2. No es obligatorio, solo debe usarse para formularios que acabaran con una descarga',
144
+ label: 'ID de documento en BI (opcional)',
145
+ mandatory: false,
146
+ example_value: ''
147
+ }
148
+ ]
149
+ };
@@ -0,0 +1,78 @@
1
+ ---
2
+ import { extractImageUrl } from '../../lib/functions.js';
3
+ import Modal_2025_Sagunto from './Modal_2025_Sagunto.astro';
4
+
5
+ const {
6
+ title,
7
+ description,
8
+ txtBtn = "Solicita una demo",
9
+ linkBtn,
10
+ src,
11
+ showBtn = true,
12
+ showImage = true,
13
+ darkImage = false,
14
+
15
+ showBtnModal = false,
16
+ txtBtnModal = '',
17
+ imageModal = '',
18
+ altModal = '',
19
+ titleModal = '',
20
+ descriptionModal = '',
21
+ lf2FormTitle = '',
22
+ idebook = '',
23
+
24
+ } = Astro.props;
25
+
26
+ const srcUrl = extractImageUrl(src);
27
+ const backgroundStyle = showImage && srcUrl ? `background-image: url('${srcUrl}');` : '';
28
+ const hasBorder = !(showImage && srcUrl);
29
+ const borderBgStyle = hasBorder
30
+ ? `background: linear-gradient(90deg, var(--BrandBlue-1000, #001978) 0%, var(--BrightBlue-1000, #2134F1) 50%, var(--Pink-1000, #F81BBD) 95%);`
31
+ : '';
32
+ const hasContent = title || description;
33
+ ---
34
+
35
+ {hasBorder ? (
36
+ <div class="w-full p-4 md:p-0">
37
+ <div class="w-full rounded-2xl p-px my-8" style={borderBgStyle}>
38
+ <section class={`w-full flex flex-col ${hasContent ? 'justify-between' : 'justify-center'} items-center p-6 rounded-2xl bg-cover bg-center min-h-[289px] bg-white`} style={backgroundStyle}>
39
+ {hasContent && (
40
+ <div class="w-full max-w-7xl flex flex-col items-center justify-center text-left gap-4">
41
+ {title && <h3 class="text-[#262626] font-poppins text-2xl font-semibold leading-8">{title}</h3>}
42
+ {description && <p class="text-[#627384] font-inter text-base font-normal leading-6" set:html={description}></p>}
43
+ </div>
44
+ )}
45
+
46
+ <div class="w-full max-w-7xl flex flex-col items-center justify-center text-center">
47
+ {showBtn && linkBtn && (
48
+ <a href={linkBtn} target="_self" class="flex items-center justify-center w-fit py-3 px-6 mx-auto gap-4 shrink-0 rounded-lg border border-[#2134F1] bg-[rgba(255,255,255,0.01)] text-[#2134F1] text-center font-[Inter] text-base font-semibold leading-6 no-underline hover:underline transition-all duration-300 cursor-pointer shadow-[0_2px_4px_-2px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.04)]">{txtBtn}</a>
49
+ )}
50
+ {showBtnModal && (
51
+ <Modal_2025_Sagunto buttonText={txtBtnModal} frontColor="#2134F1" backColor="#fffffff" borderColor="#2134F1" imageModal={imageModal} altModal={altModal} titleModal={titleModal} descriptionModal={descriptionModal} lf2FormTitle={lf2FormTitle} idebook={idebook} />
52
+ )}
53
+ </div>
54
+ </section>
55
+ </div>
56
+ </div>
57
+
58
+ ) : (
59
+ <div class="w-full flex p-4 md:p-0">
60
+ <section class={`w-full flex flex-col items-center p-6 rounded-2xl bg-cover bg-center min-h-[289px] my-8 ${hasContent ? 'justify-between gap-6' : ''}`} style={backgroundStyle}>
61
+ {hasContent && (
62
+ <div class={`w-full max-w-7xl flex flex-col items-center justify-center text-left gap-4 ${darkImage ? 'bg-white/50 backdrop-blur-sm rounded-2xl p-6' : ''}`}>
63
+ {title && <h3 class="text-[#262626] font-poppins text-2xl font-semibold leading-8">{title}</h3>}
64
+ {description && <p class="text-[#363942] font-inter text-base font-normal leading-6" set:html={description}></p>}
65
+ </div>
66
+ )}
67
+ <div class={`w-full max-w-7xl flex flex-col items-center justify-center text-center ${hasContent ? '' : 'my-auto'}`}>
68
+ {showBtn && linkBtn && (
69
+ <a href={linkBtn} target="_self" class="flex items-center justify-center w-fit py-3 px-6 mx-auto gap-4 shrink-0 rounded-lg border border-[#2134F1] bg-white text-[#2134F1] text-center font-[Inter] text-base font-semibold leading-6 no-underline hover:underline transition-all duration-300 cursor-pointer shadow-[0_2px_4px_-2px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.04)]">{txtBtn}</a>
70
+ )}
71
+ {showBtnModal && (
72
+ <Modal_2025_Sagunto buttonText={txtBtnModal} frontColor="#2134F1" backColor="#ffffff" borderColor="#2134F1" imageModal={imageModal} altModal={altModal} titleModal={titleModal} descriptionModal={descriptionModal} lf2FormTitle={lf2FormTitle} idebook={idebook} />
73
+ )}
74
+ </div>
75
+ </section>
76
+ </div>
77
+
78
+ )}
@@ -22,6 +22,7 @@ import * as Contenido_2026_Mallorca from '../carbins/Contenido_2026_Mallorca.ts'
22
22
  import * as Contenido_2026_Marruecos from '../carbins/Contenido_2026_Marruecos.ts';
23
23
  import * as Contenido_2026_Menorca from '../carbins/Contenido_2026_Menorca.ts';
24
24
  import * as Contenido_2026_Michigan from '../carbins/Contenido_2026_Michigan.ts';
25
+ import * as Contenido_2026_Moraira from '../carbins/Contenido_2026_Moraira.ts';
25
26
  import * as Contenido_2026_Mostoles from '../carbins/Contenido_2026_Mostoles.ts';
26
27
  import * as Contenido_2026_Orcasitas from '../carbins/Contenido_2026_Orcasitas.ts';
27
28
  import * as Contenido_2026_Oslo from '../carbins/Contenido_2026_Oslo.ts';
@@ -107,6 +108,7 @@ export const components = [
107
108
  {component: Contenido_2026_Marruecos},
108
109
  {component: Contenido_2026_Menorca},
109
110
  {component: Contenido_2026_Michigan},
111
+ {component: Contenido_2026_Moraira},
110
112
  {component: Contenido_2026_Mostoles},
111
113
  {component: Contenido_2026_Orcasitas},
112
114
  {component: Contenido_2026_Oslo},
package/src/index.ts CHANGED
@@ -27,6 +27,7 @@ import Contenido_2026_Mallorca from './components/Astro/Contenido_2026_Mallorca.
27
27
  import Contenido_2026_Marruecos from './components/Astro/Contenido_2026_Marruecos.astro';
28
28
  import Contenido_2026_Menorca from './components/Astro/Contenido_2026_Menorca.astro';
29
29
  import Contenido_2026_Michigan from './components/Astro/Contenido_2026_Michigan.astro';
30
+ import Contenido_2026_Moraira from './components/Astro/Contenido_2026_Moraira.astro';
30
31
  import Contenido_2026_Mostoles from './components/Astro/Contenido_2026_Mostoles.astro';
31
32
  import Contenido_2026_Orcasitas from './components/Astro/Contenido_2026_Orcasitas.astro';
32
33
  import Contenido_2026_Oslo from './components/Astro/Contenido_2026_Oslo.astro';
@@ -93,7 +94,7 @@ import ReactButton from './components/React/ReactButton.jsx';
93
94
  // Exporta todos los componentes uno a uno para que puedan ser usados directamente.
94
95
 
95
96
 
96
- export { VueButton, Author_2025_Algarve, Button, CTA_2025_Formentera, Cabecera_2025_Barcelona, Cabecera_2025_Madrid, Cabecera_2026_Bilbao, Cabecera_2026_Madrid, Card_2025_Malta, Contenido_2025_Alcorcon, Contenido_2025_Cordoba, Contenido_2025_Granada, Contenido_2025_Malaga, Contenido_2025_Montevideo, Contenido_2026_Cabra, Contenido_2026_Denia, Contenido_2026_Dubai, Contenido_2026_Estocolmo, Contenido_2026_Jaen, Contenido_2026_Leon, Contenido_2026_Mallorca, Contenido_2026_Marruecos, Contenido_2026_Menorca, Contenido_2026_Michigan, Contenido_2026_Mostoles, Contenido_2026_Orcasitas, Contenido_2026_Oslo, Contenido_2026_Quito, Contenido_2026_Seattle, Contenido_2026_Sevilla, Contenido_2026_Tokyo, Contenido_2026_Ubeda, Contenido_2026_Yakarta, CorpFooter, CorpHero, CorpNavigation, Enlace_2025_Venecia, FAQ_2025_Hiroshima, Footer_2025_Napoles, Formulario_2025_Nara, Formulario_2025_Seul, Formulario_2025_Teruel, Formulario_2026_Carabanchel, Formulario_2026_Wichita, GeometricShape, GeometricShapeCard, HeaderCorporativo, Hero_2025_Benidorm, Hero_2026_Benidorm, ImageTextSimple, Imagen_2025_Bogota, Imagen_2025_Fukushima, Imagen_2026_Algar, Indice_2025_Taiwan, Modal_2025_Sagunto, Paginacion_2025_Paris, RRSS_2025_Pisa, SEO_Head_Section, SEO_Schema_Page, Separador_2025_Reinosa, Separador_2025_Toledo, Share_2025_Florencia, SpectrumSeparator, Sumario_2025_Beijing, Tabla_2025_Fuenlabrada, Tabla_2026_Cadiz, Tag_2025_Bolonia, TestHijo, TestPadre, Test_2026_Gaza, TextBox, TextImageBackground, TextImageBlock, TextImageCard, TextImageHeader, Texto_2025_Kyoto, Texto_2026_Alicante, Texto_2026_Castellon, Tiempo_2025_Londres, Titulo_2025_Algeciras, Titulo_2025_Santorini, VideoAutoplay, Video_2025_Polop, Video_2025_Valencia, Video_2026_Andujar, ReactButton };
97
+ export { VueButton, Author_2025_Algarve, Button, CTA_2025_Formentera, Cabecera_2025_Barcelona, Cabecera_2025_Madrid, Cabecera_2026_Bilbao, Cabecera_2026_Madrid, Card_2025_Malta, Contenido_2025_Alcorcon, Contenido_2025_Cordoba, Contenido_2025_Granada, Contenido_2025_Malaga, Contenido_2025_Montevideo, Contenido_2026_Cabra, Contenido_2026_Denia, Contenido_2026_Dubai, Contenido_2026_Estocolmo, Contenido_2026_Jaen, Contenido_2026_Leon, Contenido_2026_Mallorca, Contenido_2026_Marruecos, Contenido_2026_Menorca, Contenido_2026_Michigan, Contenido_2026_Moraira, Contenido_2026_Mostoles, Contenido_2026_Orcasitas, Contenido_2026_Oslo, Contenido_2026_Quito, Contenido_2026_Seattle, Contenido_2026_Sevilla, Contenido_2026_Tokyo, Contenido_2026_Ubeda, Contenido_2026_Yakarta, CorpFooter, CorpHero, CorpNavigation, Enlace_2025_Venecia, FAQ_2025_Hiroshima, Footer_2025_Napoles, Formulario_2025_Nara, Formulario_2025_Seul, Formulario_2025_Teruel, Formulario_2026_Carabanchel, Formulario_2026_Wichita, GeometricShape, GeometricShapeCard, HeaderCorporativo, Hero_2025_Benidorm, Hero_2026_Benidorm, ImageTextSimple, Imagen_2025_Bogota, Imagen_2025_Fukushima, Imagen_2026_Algar, Indice_2025_Taiwan, Modal_2025_Sagunto, Paginacion_2025_Paris, RRSS_2025_Pisa, SEO_Head_Section, SEO_Schema_Page, Separador_2025_Reinosa, Separador_2025_Toledo, Share_2025_Florencia, SpectrumSeparator, Sumario_2025_Beijing, Tabla_2025_Fuenlabrada, Tabla_2026_Cadiz, Tag_2025_Bolonia, TestHijo, TestPadre, Test_2026_Gaza, TextBox, TextImageBackground, TextImageBlock, TextImageCard, TextImageHeader, Texto_2025_Kyoto, Texto_2026_Alicante, Texto_2026_Castellon, Tiempo_2025_Londres, Titulo_2025_Algeciras, Titulo_2025_Santorini, VideoAutoplay, Video_2025_Polop, Video_2025_Valencia, Video_2026_Andujar, ReactButton };
97
98
 
98
99
 
99
100
  // Exporta la función listComponents para que sea usado en el Pagebuilder en Vue.
@@ -132,6 +133,7 @@ export const components = {
132
133
  Contenido_2026_Marruecos: Contenido_2026_Marruecos,
133
134
  Contenido_2026_Menorca: Contenido_2026_Menorca,
134
135
  Contenido_2026_Michigan: Contenido_2026_Michigan,
136
+ Contenido_2026_Moraira: Contenido_2026_Moraira,
135
137
  Contenido_2026_Mostoles: Contenido_2026_Mostoles,
136
138
  Contenido_2026_Orcasitas: Contenido_2026_Orcasitas,
137
139
  Contenido_2026_Oslo: Contenido_2026_Oslo,