libreria-astro-lefebvre 0.1.49 → 0.1.51

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.51",
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
  };
@@ -2,7 +2,7 @@
2
2
  const {
3
3
  title,
4
4
  items = [],
5
- initialState = "all-closed",
5
+ initialState = "all-open",
6
6
  noSchema = false
7
7
  } = Astro.props;
8
8
 
@@ -34,14 +34,14 @@ const structuredData = !noSchema && items.length > 0 ? `<script type="applicatio
34
34
  {items.map((item: { question: string; answer: string }, index: number) => {
35
35
  const isOpen = allOpen || (initialState === 'first-open' && index === 0);
36
36
  return (
37
- <div class="faq-item w-full border-b border-[#E0E0E0]">
38
- <button class="faq-toggle flex items-center justify-between w-full py-4 cursor-pointer bg-transparent border-none font-inter text-[#262626] text-base font-semibold leading-6 hover:bg-[rgba(0,25,120,0.04)] transition-all text-left px-4">
37
+ <div class="faq-item w-full border-b border-[#E0E0E0] rounded-2xl shadow-[0_2px_4px_-2px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.04)] mb-3">
38
+ <button class="faq-toggle flex items-center justify-between w-full py-6 cursor-pointer bg-transparent font-inter text-[#262626] text-base font-semibold leading-6 hover:bg-[rgba(0,25,120,0.04)] rounded-2xl transition-all text-left px-4">
39
39
  <span>{item.question}</span>
40
- <svg class={`faq-arrow w-5 h-5 shrink-0 transition-transform duration-300${isOpen ? ' rotate-180' : ''}`} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="#262626">
41
- <path fill-rule="evenodd" d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z" clip-rule="evenodd" />
40
+ <svg class={`faq-arrow shrink-0 -scale-y-100 transition-transform duration-300${isOpen ? ' rotate-180' : ''}`} xmlns="http://www.w3.org/2000/svg" width="12" height="17" viewBox="0 0 12 17" fill="none">
41
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M5.81854 0.0209452C5.76196 0.0379263 5.68058 0.075179 5.6377 0.103713C5.52731 0.177114 0.11211 5.94283 0.0713747 6.03031C0.0105434 6.16092 -0.0154752 6.35561 0.00932299 6.49458C0.0418748 6.67705 0.0949975 6.78302 0.218129 6.91116C0.413508 7.1145 0.688797 7.17488 0.952965 7.07237C1.07784 7.02393 1.17979 6.91976 3.19161 4.78509L5.29941 2.54856L5.30521 9.26125L5.31102 15.974L5.37143 16.0956C5.50041 16.3553 5.72556 16.5 6.00049 16.5C6.27542 16.5 6.50057 16.3553 6.62955 16.0956L6.68996 15.974L6.69577 9.26113L6.70158 2.54832L8.80938 4.78504C10.8221 6.92094 10.9231 7.02407 11.048 7.07247C11.3123 7.17484 11.5875 7.11443 11.7829 6.91116C11.9048 6.78422 11.9591 6.677 11.9905 6.50095C12.0179 6.34771 11.9843 6.13743 11.9115 6.00629C11.8822 5.95345 10.6293 4.6055 9.12716 3.01089C6.9192 0.666875 6.37592 0.102152 6.29081 0.0624731C6.1555 -0.000599483 5.95033 -0.0186613 5.81854 0.0209452Z" fill="#001978"/>
42
42
  </svg>
43
43
  </button>
44
- <div class={`faq-answer pb-4 text-[#363942] font-inter text-base font-normal leading-6 p-4 prose prose-sm max-w-none${isOpen ? '' : ' hidden'}`} set:html={item.answer} />
44
+ <div class={`faq-answer pb-4 text-[#363942] font-inter text-base font-normal leading-6 p-4 prose prose-sm max-w-none ${isOpen ? '' : ' hidden'}`} set:html={item.answer} />
45
45
  </div>
46
46
  );
47
47
  })}
@@ -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>