libreria-astro-lefebvre 0.1.49 → 0.1.50

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.49",
3
+ "version": "0.1.50",
4
4
  "description": "Librería de componentes Astro, React y Vue para Lefebvre",
5
5
  "author": "Equipo web desarrollo Lefebvre",
6
6
  "type": "module",
@@ -67,6 +67,24 @@ export const metadata: ComponentMetadata = {
67
67
  label: 'Sub-descripción (Poppins 20px)',
68
68
  mandatory: false,
69
69
  example_value: 'Automatiza tareas, redacta documentos y encuentra jurisprudencia en segundos'
70
+ },
71
+ {
72
+ name: 'fontFamily',
73
+ type: 'select',
74
+ help: 'Tipografía de la descripción y sub-descripción. "Inter" (por defecto) o "Poppins". No afecta a los títulos (h1–h6), que siempre usan Poppins',
75
+ label: 'Tipografía de la descripción',
76
+ options: ['inter', 'poppins'],
77
+ options_labels: ['Inter', 'Poppins'],
78
+ example_value: 'inter'
79
+ },
80
+ {
81
+ name: 'fontSize',
82
+ type: 'select',
83
+ help: 'Tamaño del texto de la descripción y sub-descripción. "base" 16px (por defecto), "sm" 14px, "lg" 18px, "xl" 20px, "2xl" 24px. No afecta a los títulos. ATENCIÓN: Tailwind JIT no genera clases desde template strings dinámicos (text-${fontSize}), por lo que requiere estar en la safelist del tailwind.config',
84
+ label: 'Tamaño del texto de la descripción',
85
+ options: ['sm', 'base', 'lg', 'xl', '2xl'],
86
+ options_labels: ['SM (14px)', 'Base (16px)', 'LG (18px)', 'XL (20px)', '2XL (24px)'],
87
+ example_value: 'base'
70
88
  }
71
89
  ]
72
90
  };
@@ -8,6 +8,8 @@ const {
8
8
  descriptionWidth = "1/3", // 1/3 3/5 full
9
9
  flexJustify = "justify-center",
10
10
  subdescription = "",
11
+ fontFamily = "inter", // inter | poppins
12
+ fontSize = "base", // sm | base | lg | xl | 2xl
11
13
  } = Astro.props;
12
14
 
13
15
  ---
@@ -35,13 +37,13 @@ const {
35
37
  tipo === "h1" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] px-6 md:mb-16" set:html={h1Subtitle}></h2>
36
38
  : tipo === "h2-mb24" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] px-6 md:mb-8" set:html={h1Subtitle}></h2>
37
39
  : tipo === "h1-home" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] mb-0 mt-8 md:mt-20" set:html={h1Subtitle}></h2>
38
- : tipo === "h1-40" ? <h2 class="font-poppins text-[#262626] text-[40px] font-normal text-center leading-[48px] mb-0 md:mb-8" set:html={h1Subtitle}></h2>
40
+ : tipo === "h1-40" ? <h2 class="font-poppins text-[#262626] text-[40px] font-normal text-center leading-[48px] mb-0 md:mb-6" set:html={h1Subtitle}></h2>
39
41
  : null
40
42
  )}
41
43
  {description && description.trim() !== "" && (
42
- <div class={`w-full md:w-${descriptionWidth} text-[#363942] mx-auto max-w-[850px] font-inter text-base font-normal leading-7 mb-8 text-center`} set:html={description}></div>
44
+ <div class={`w-full md:w-${descriptionWidth} text-[#363942] mx-auto max-w-[850px] font-${fontFamily} text-${fontSize} font-normal leading-7 mb-8 text-center`} set:html={description}></div>
43
45
  )}
44
46
  {subdescription && subdescription.trim() !== "" && (
45
- <div class={`w-full md:w-${descriptionWidth} text-[#363942] mx-auto max-w-[850px] font-poppins text-xl font-normal leading-7 mb-8 text-center`} set:html={subdescription}></div>
47
+ <div class={`w-full md:w-${descriptionWidth} text-[#363942] mx-auto max-w-[850px] font-${fontFamily} text-${fontSize} font-normal leading-7 mb-8 text-center`} set:html={subdescription}></div>
46
48
  )}
47
49
  </div>