libreria-astro-lefebvre 0.1.8 → 0.1.10

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.8",
3
+ "version": "0.1.10",
4
4
  "description": "Librería de componentes Astro, React y Vue para Lefebvre",
5
5
  "author": "Equipo web desarrollo Lefebvre",
6
6
  "type": "module",
@@ -28,7 +28,7 @@ export const metadata: ComponentMetadata = {
28
28
  {
29
29
  name: 'showBtn',
30
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',
31
+ help: 'Activa o desactiva el botón. Recuerda: también requiere "Enlace del botón" relleno; si está vacío el botón no aparece',
32
32
  label: 'Mostrar botón',
33
33
  mandatory: false,
34
34
  options: ['false', 'true'],
@@ -12,7 +12,7 @@ export const metadata: ComponentMetadata = {
12
12
  {
13
13
  name: 'title',
14
14
  type: 'text',
15
- help: 'Introduce el título del formulario',
15
+ help: 'Título (h2) del bloque. No admite HTML',
16
16
  label: 'Texto del título',
17
17
  mandatory: false,
18
18
  example_value: 'Pruébalo ya'
@@ -20,7 +20,7 @@ export const metadata: ComponentMetadata = {
20
20
  {
21
21
  name: 'description',
22
22
  type: 'text',
23
- help: 'Introduce la descripción del formulario',
23
+ help: 'Descripción que aparece debajo del título. No admite HTML',
24
24
  label: 'Texto de la descripción',
25
25
  mandatory: false,
26
26
  example_value: 'Texto descriptivo del título'
@@ -33,18 +33,10 @@ export const metadata: ComponentMetadata = {
33
33
  mandatory: false,
34
34
  example_value: 'Texto descriptivo del título'
35
35
  },
36
- {
37
- name: 'imageSrc',
38
- type: 'image',
39
- help: 'Introduce la URL de la imagen del formulario',
40
- label: 'Src de la imagen',
41
- mandatory: false,
42
- example_value: 'https://assets.lefebvre.es/media/img/preview-comp/comp-3-4.png'
43
- },
44
36
  {
45
37
  name: 'lf2FormTitle',
46
38
  type: 'text',
47
- help: 'Introduce el título del formulario en LF2',
39
+ help: 'Nombre EXACTO del formulario tal como está dado de alta en LF2 (incluye normalmente un código numérico + nombre). Este valor se pasa a apiManager.pintarFormularioAutogestionado() para cargar el formulario correcto. Si es erróneo, el formulario no se renderizará',
48
40
  label: 'Título del formulario en LF2',
49
41
  mandatory: false,
50
42
  example_value: '27925 Formulario Vamos Más Allá'
@@ -52,7 +44,7 @@ export const metadata: ComponentMetadata = {
52
44
  {
53
45
  name: 'businessAction',
54
46
  type: 'text',
55
- help: 'Introduce el identificador businessAction del formulario en LF2',
47
+ help: 'Identificador de acción comercial de LF2 que se asociará al lead. Si se deja vacío, no se envía acción comercial (el formulario funciona pero sin tracking de acción específica)',
56
48
  label: 'businessAction del formulario en LF2',
57
49
  mandatory: false,
58
50
  example_value: '27925'
@@ -60,30 +52,11 @@ export const metadata: ComponentMetadata = {
60
52
  {
61
53
  name: 'orientation',
62
54
  type: 'select',
63
- help: 'Selecciona la posición de la imagen respecto al formulario',
55
+ help: 'Posición del formulario respecto al texto. "Izquierda" coloca el formulario a la izquierda (flex-row); "Derecha" lo coloca a la derecha (flex-row-reverse)',
64
56
  label: 'Orientación del contenido',
65
57
  options: ['left', 'right'],
66
58
  options_labels: ['Izquierda', 'Derecha'],
67
59
  example_value: 'left'
68
60
  },
69
- {
70
- name: 'loading',
71
- type: 'select',
72
- help: 'Selecciona el tipo de carga de la imagen: diferida o inmediata',
73
- label: 'Carga de la imagen',
74
- options: ['lazy', 'eager'],
75
- options_labels: ['Diferida', 'Inmediata'],
76
- example_value: 'lazy'
77
- },
78
- {
79
- name: 'showImage',
80
- type: 'boolean',
81
- help: 'Indica si se debe mostrar la imagen',
82
- label: 'Mostrar imagen',
83
- mandatory: false,
84
- options: ['false', 'true'],
85
- options_labels: ['Falso', 'Verdadero'],
86
- example_value: true
87
- }
88
61
  ]
89
62
  };
@@ -39,13 +39,13 @@ const hasContent = title || description;
39
39
  {hasContent && (
40
40
  <div class="w-full max-w-7xl flex flex-col items-center justify-center text-left gap-4">
41
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>}
42
+ {description && <p class="text-[#363942] font-inter text-base font-normal leading-6" set:html={description}></p>}
43
43
  </div>
44
44
  )}
45
45
 
46
46
  <div class="w-full max-w-7xl flex flex-col items-center justify-center text-center">
47
47
  {showBtn && linkBtn && (
48
- <a href={linkBtn} target="_self" class="flex items-center justify-center h-12 gap-4 shrink-0 self-stretch 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>
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
49
  )}
50
50
  {showBtnModal && (
51
51
  <Modal_2025_Sagunto buttonText={txtBtnModal} frontColor="#2134F1" backColor="#fffffff" borderColor="#2134F1" imageModal={imageModal} altModal={altModal} titleModal={titleModal} descriptionModal={descriptionModal} lf2FormTitle={lf2FormTitle} idebook={idebook} />
@@ -66,7 +66,7 @@ const hasContent = title || description;
66
66
  )}
67
67
  <div class={`w-full max-w-7xl flex flex-col items-center justify-center text-center ${hasContent ? '' : 'my-auto'}`}>
68
68
  {showBtn && linkBtn && (
69
- <a href={linkBtn} target="_self" class="flex items-center justify-center h-12 gap-4 shrink-0 self-stretch 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>
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
70
  )}
71
71
  {showBtnModal && (
72
72
  <Modal_2025_Sagunto buttonText={txtBtnModal} frontColor="#2134F1" backColor="#ffffff" borderColor="#2134F1" imageModal={imageModal} altModal={altModal} titleModal={titleModal} descriptionModal={descriptionModal} lf2FormTitle={lf2FormTitle} idebook={idebook} />
@@ -6,15 +6,11 @@ const {
6
6
  subTitle,
7
7
  description = "",
8
8
  mainContent="",
9
- showImage = false,
10
9
  orientation = "left",
11
- imageSrc,
12
10
  lf2FormTitle = "Formulario de contacto",
13
11
  businessAction = false,
14
- loading = "lazy"
15
12
  } = Astro.props;
16
13
 
17
- const imageSrcUrl = extractImageUrl(imageSrc);
18
14
  const idTargetLf2 = 'lf2-form-' + Math.random().toString(36).substring(2, 15);
19
15
 
20
16
  const escapeJson = (s = "") => String(s).replace(/<[^>]*>/g, '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/</g, '\\u003c').replace(/>/g, '\\u003e').replace(/[\n\r\t]+/g, ' ');
@@ -36,18 +32,6 @@ const structuredData = `<script type="application/ld+json">
36
32
 
37
33
  <div class="w-full flex flex-col md:flex-row px-6 md:px-4 lg:px-0 gap-8">
38
34
  <div class="max-w-7xl w-full mx-auto flex justify-start flex-col px-12 bg-[linear-gradient(to_right,#E3E3EE,#FFFFFF,#D7EBF5)]">
39
- {showImage ? (
40
- <article class="flex flex-col items-center justify-center">
41
- <div class={`flex-col md:flex ${orientation === 'left' ? 'flex-row' : 'flex-row-reverse'} w-full items-start gap-4 justify-between`}>
42
- <div class="w-full flex justify-start mt-12 mb-8 flex-col">
43
- <div id={idTargetLf2} class="w-full flex flex-col mx-auto gap-3"></div>
44
- </div>
45
- <div class={`w-full p-0 md:p-4 flex items-center ${orientation === 'left' ? 'justify-end' : 'justify-start'}`}>
46
- <img src={imageSrcUrl} alt={title} width="600" height="650" class="w-full md:w-4/5 min-h-auto md:min-h-[650px] object-cover rounded-lg" loading={loading}/>
47
- </div>
48
- </div>
49
- </article>
50
- ) : (
51
35
  <article class="flex flex-col items-center justify-center">
52
36
  <div class={`flex-col md:flex ${orientation === 'left' ? 'flex-row' : 'flex-row-reverse'} w-full items-start gap-4 justify-center`}>
53
37
  <div class="w-full md:w-1/3 flex justify-start mt-12 mb-8 flex-col">
@@ -61,7 +45,6 @@ const structuredData = `<script type="application/ld+json">
61
45
  </div>
62
46
  </div>
63
47
  </article>
64
- )}
65
48
  </div>
66
49
  </div>
67
50