libreria-astro-lefebvre 0.1.143 → 0.1.145

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.143",
3
+ "version": "0.1.145",
4
4
  "description": "Librería de componentes Astro, React y Vue para Lefebvre",
5
5
  "author": "Equipo web desarrollo Lefebvre",
6
6
  "type": "module",
@@ -68,6 +68,15 @@ export const metadata: ComponentMetadata = {
68
68
  mandatory: false,
69
69
  example_value: 'Automatiza tareas, redacta documentos y encuentra jurisprudencia en segundos'
70
70
  },
71
+ {
72
+ name: 'fontFamily',
73
+ type: 'select',
74
+ help: 'OBSOLETO: este campo se ignora. La tipografía de la descripción y sub-descripción se deduce del tamaño: 20px o más (XL, 2XL) usa IBM Plex Serif; menos de 20px (SM, Base, LG) usa IBM Plex Sans. Se mantiene solo por compatibilidad con contenido ya guardado',
75
+ label: 'Tipografía de la descripción (obsoleto, se ignora)',
76
+ options: ['inter', 'poppins'],
77
+ options_labels: ['IBM Plex Sans', 'IBM Plex Serif'],
78
+ example_value: 'inter'
79
+ },
71
80
  {
72
81
  name: 'fontSize',
73
82
  type: 'select',
@@ -80,11 +89,11 @@ export const metadata: ComponentMetadata = {
80
89
  {
81
90
  name: 'background',
82
91
  type: 'select',
83
- help: 'Color de fondo del bloque del título. Por defecto transparente, que hereda el fondo de la página. Se aplica al contenedor del componente (ancho completo en móvil, 3/5 del ancho en escritorio)',
92
+ help: 'Color de fondo del bloque del título. Por defecto blanco. "Transparente" hereda el fondo de la página. Se aplica al contenedor del componente (ancho completo en móvil, 3/5 del ancho en escritorio)',
84
93
  label: 'Color de fondo',
85
94
  options: ['#FFFFFF', 'transparent', '#F8F8F8', '#F2F3F8', '#DDE0EC'],
86
95
  options_labels: ['Blanco', 'Transparente', 'Gris muy claro', 'Gris claro', 'Azul claro'],
87
- example_value: 'transparent'
96
+ example_value: '#FFFFFF'
88
97
  }
89
98
  ]
90
99
  };
@@ -49,7 +49,7 @@ const {
49
49
  ---
50
50
 
51
51
  <nav class="w-full flex">
52
- <div class="font-body max-w-7xl w-full mx-auto flex gap-2 text-[#363942] px-6 md:px-2 py-2 text-sm items-center">
52
+ <div class="font-body max-w-7xl w-full mx-auto flex gap-2 bg-white text-[#363942] px-6 md:px-2 py-2 text-sm items-center">
53
53
  <a href={subdirectory + '/'} class="flex items-center gap-2 underline">
54
54
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
55
55
  <path fill-rule="evenodd" clip-rule="evenodd" d="M11.607 2.26475C11.1639 2.32582 10.6509 2.48899 10.1624 2.72428C9.60055 2.99492 9.00859 3.34706 6.66084 4.80718C4.31852 6.26394 3.93572 6.53182 3.40193 7.08788C2.90464 7.60592 2.64374 8.07514 2.46575 8.77158C2.28122 9.49354 2.26758 9.74391 2.2535 12.6665C2.24172 15.1104 2.25893 16.3111 2.31649 17.061C2.44485 18.7333 2.80188 19.7175 3.55237 20.4678C4.28974 21.2051 5.2235 21.5501 6.83418 21.6806C7.50612 21.735 8.61888 21.75 11.9999 21.75C15.3809 21.75 16.4937 21.735 17.1656 21.6806C18.7575 21.5516 19.699 21.2081 20.4254 20.4911C20.9976 19.9264 21.341 19.2288 21.5307 18.2464C21.724 17.2457 21.7637 16.2126 21.7463 12.6447C21.7321 9.7458 21.7182 9.49232 21.534 8.77158C21.356 8.07514 21.0951 7.60592 20.5979 7.08788C20.0641 6.53182 19.6813 6.26394 17.3389 4.80718C14.9942 3.34893 14.4021 2.99663 13.8362 2.72324C13.4707 2.54669 13.003 2.3831 12.6586 2.3114C12.3947 2.25643 11.8444 2.23204 11.607 2.26475ZM11.6269 3.73267C11.5426 3.74947 11.3777 3.79614 11.2605 3.83636C10.6997 4.02896 10.2326 4.29571 7.66624 5.88901C5.52292 7.21964 5.04514 7.53681 4.65608 7.88712C3.98123 8.49478 3.78607 9.00003 3.72514 10.2972C3.69616 10.9139 3.69657 15.5359 3.72565 16.2378C3.80342 18.1147 4.03097 18.9336 4.63227 19.501C5.0201 19.867 5.59984 20.0807 6.49905 20.189C7.24869 20.2793 7.46553 20.283 11.9999 20.283C16.5343 20.283 16.7511 20.2793 17.5007 20.189C19.2668 19.9762 19.925 19.3378 20.1684 17.6016C20.2815 16.7945 20.3028 15.9639 20.291 12.8283C20.284 10.9976 20.272 10.0331 20.254 9.86956C20.1456 8.88351 19.9347 8.41609 19.3684 7.90674C18.9506 7.53089 18.535 7.25522 16.2312 5.82558C13.7693 4.29779 13.2896 4.02434 12.7476 3.83985C12.3354 3.69954 11.9691 3.6645 11.6269 3.73267Z" fill="#363942"/>
@@ -49,7 +49,7 @@ const structuredData = `<script type="application/ld+json">
49
49
 
50
50
  .listIco :global(ul li) {
51
51
  position: relative;
52
- padding-left: 32px;
52
+ padding-left: 28px;
53
53
  margin-bottom: 12px;
54
54
  color: #363942;
55
55
  font-family: 'IBM Plex Sans', sans-serif;
@@ -61,10 +61,10 @@ const structuredData = `<script type="application/ld+json">
61
61
  content: "";
62
62
  position: absolute;
63
63
  left: 0;
64
- top: 0;
65
- width: 24px;
66
- height: 24px;
67
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.4279 2.25581C11.377 2.26087 11.2157 2.27575 11.0695 2.28891C7.45138 2.61388 4.26164 5.00985 2.92199 8.40893C2.45092 9.60413 2.25 10.6768 2.25 11.9966C2.25 12.7644 2.29448 13.25 2.42461 13.9036C2.93334 16.4587 4.44721 18.7007 6.64222 20.1499C8.88897 21.6332 11.6788 22.1142 14.3064 21.4712C17.6067 20.6637 20.2374 18.216 21.2845 14.9785C22.1857 12.1919 21.7631 9.08849 20.1496 6.64581C19.0333 4.95576 17.4398 3.65798 15.5829 2.92649C14.7233 2.58788 13.9283 2.39473 12.9539 2.28784C12.7208 2.26225 11.5995 2.23875 11.4279 2.25581ZM11.3932 3.712C9.8296 3.84533 8.38149 4.36736 7.17363 5.23312C6.49438 5.72 5.71618 6.49801 5.22918 7.17709C4.5156 8.17213 3.99702 9.43032 3.80005 10.6444C3.71638 11.1602 3.7063 11.3058 3.7063 11.9966C3.7063 12.6875 3.71638 12.8331 3.80005 13.3489C3.86077 13.7231 4.03586 14.4385 4.1098 14.6143C4.12185 14.643 4.17949 14.7965 4.23789 14.9554C4.41248 15.4304 4.72595 16.0521 5.0247 16.5157C5.61847 17.4371 6.57602 18.3916 7.49732 18.9803C7.94737 19.2679 8.57256 19.5813 9.03486 19.7512C9.19382 19.8096 9.34732 19.8672 9.37599 19.8792C9.55187 19.9532 10.2674 20.1282 10.6418 20.1889C11.1577 20.2726 11.3033 20.2826 11.9943 20.2826C12.6854 20.2826 12.831 20.2726 13.3469 20.1889C13.7213 20.1282 14.4368 19.9532 14.6127 19.8792C14.6414 19.8672 14.7949 19.8096 14.9538 19.7512C15.4161 19.5813 16.0413 19.2679 16.4914 18.9803C17.2409 18.5014 18.0559 17.7439 18.6221 17C19.4157 15.9574 19.9781 14.6467 20.1886 13.3489C20.2723 12.8331 20.2824 12.6875 20.2824 11.9966C20.2824 11.3058 20.2723 11.1602 20.1886 10.6444C20.1279 10.2701 19.9528 9.55475 19.8789 9.37891C19.8668 9.35025 19.8092 9.19679 19.7508 9.03787C19.5762 8.56283 19.2627 7.94119 18.964 7.47759C18.3702 6.55612 17.4127 5.60165 16.4914 5.01295C16.0413 4.72535 15.4161 4.41191 14.9538 4.24208C14.7949 4.18369 14.6414 4.12606 14.6127 4.11402C14.5274 4.07817 14.0109 3.93783 13.7747 3.88633C13.1749 3.75557 12.8453 3.72043 12.1331 3.71128C11.7834 3.7068 11.4504 3.70712 11.3932 3.712ZM14.9169 9.05699C14.8521 9.07939 14.7585 9.1304 14.7088 9.17034C14.6592 9.21029 13.7241 10.1379 12.6308 11.2318L10.643 13.2206L9.95854 12.5398C9.17315 11.7587 9.13699 11.7328 8.82664 11.7319C8.68294 11.7315 8.63041 11.7425 8.52112 11.796C8.18369 11.961 8.02866 12.351 8.15911 12.7065C8.20498 12.8316 8.27347 12.9058 9.20533 13.841C10.3402 14.9798 10.324 14.9672 10.6418 14.9666C10.7842 14.9663 10.8533 14.9542 10.9423 14.9137C11.038 14.8703 11.4645 14.4545 13.4194 12.4985C15.6775 10.2394 15.7831 10.13 15.8298 10.0021C16.0412 9.42318 15.4946 8.85734 14.9169 9.05699Z' fill='%23D71635'/%3E%3C/svg%3E");
64
+ top: 2px;
65
+ width: 20px;
66
+ height: 20px;
67
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.17788 0.00580546C9.12701 0.0108677 8.96575 0.025754 8.81951 0.0389066C5.20138 0.363884 2.01164 2.75985 0.671987 6.15893C0.200921 7.35413 0 8.42681 0 9.74663C0 10.5144 0.0444848 11 0.174609 11.6536C0.68334 14.2087 2.19721 16.4507 4.39222 17.8999C6.63897 19.3832 9.42877 19.8642 12.0564 19.2212C15.3567 18.4137 17.9874 15.9659 19.0345 12.7285C19.9357 9.94188 19.5131 6.83849 17.8996 4.39581C16.7833 2.70576 15.1898 1.40798 13.3329 0.676495C12.4733 0.337879 11.6783 0.144728 10.7039 0.0378433C10.4708 0.0122547 9.34953 -0.0112536 9.17788 0.00580546ZM9.1432 1.462C7.5796 1.59533 6.13149 2.11736 4.92363 2.98312C4.24438 3.47 3.46618 4.24801 2.97918 4.92709C2.2656 5.92213 1.74702 7.18032 1.55005 8.39438C1.46638 8.9102 1.4563 9.05576 1.4563 9.74663C1.4563 10.4375 1.46638 10.5831 1.55005 11.0989C1.61077 11.4731 1.78586 12.1885 1.8598 12.3643C1.87185 12.393 1.92949 12.5465 1.98789 12.7054C2.16248 13.1804 2.47595 13.8021 2.7747 14.2657C3.36847 15.1871 4.32602 16.1416 5.24732 16.7303C5.69737 17.0179 6.32256 17.3313 6.78486 17.5012C6.94382 17.5596 7.09732 17.6172 7.12599 17.6292C7.30187 17.7032 8.01742 17.8782 8.39177 17.9389C8.90771 18.0226 9.05331 18.0326 9.74434 18.0326C10.4354 18.0326 10.581 18.0226 11.0969 17.9389C11.4713 17.8782 12.1868 17.7032 12.3627 17.6292C12.3914 17.6172 12.5449 17.5596 12.7038 17.5012C13.1661 17.3313 13.7913 17.0179 14.2414 16.7303C14.9909 16.2514 15.8059 15.4939 16.3721 14.75C17.1657 13.7074 17.7281 12.3967 17.9386 11.0989C18.0223 10.5831 18.0324 10.4375 18.0324 9.74663C18.0324 9.05576 18.0223 8.9102 17.9386 8.39438C17.8779 8.02012 17.7028 7.30475 17.6289 7.12891C17.6168 7.10025 17.5592 6.94679 17.5008 6.78787C17.3262 6.31283 17.0127 5.69119 16.714 5.22759C16.1202 4.30612 15.1627 3.35165 14.2414 2.76295C13.7913 2.47535 13.1661 2.16191 12.7038 1.99208C12.5449 1.93369 12.3914 1.87606 12.3627 1.86402C12.2774 1.82817 11.7609 1.68783 11.5247 1.63633C10.9249 1.50557 10.5953 1.47043 9.88307 1.46128C9.53336 1.4568 9.20042 1.45712 9.1432 1.462ZM12.6669 6.80699C12.6021 6.82939 12.5085 6.8804 12.4588 6.92034C12.4092 6.96029 11.4741 7.88793 10.3808 8.98179L8.39299 10.9706L7.70854 10.2898C6.92315 9.50865 6.88699 9.48283 6.57664 9.48193C6.43294 9.48149 6.38041 9.49252 6.27112 9.54596C5.93369 9.711 5.77866 10.101 5.90911 10.4565C5.95498 10.5816 6.02347 10.6558 6.95533 11.591C8.09016 12.7298 8.07402 12.7172 8.39177 12.7166C8.53422 12.7163 8.6033 12.7042 8.69234 12.6637C8.78804 12.6203 9.2145 12.2045 11.1694 10.2485C13.4275 7.98936 13.5331 7.87997 13.5798 7.75205C13.7912 7.17318 13.2446 6.60734 12.6669 6.80699Z' fill='%23001978'/%3E%3C/svg%3E");
68
68
  background-repeat: no-repeat;
69
69
  background-size: contain;
70
70
  }
@@ -47,8 +47,8 @@ const structuredData = !noSchema && items.length > 0 ? `<script type="applicatio
47
47
  {arrowIconSvg ? (
48
48
  <span class={`faq-arrow inline-flex shrink-0 transition-transform duration-300 [&>svg]:w-full [&>svg]:h-full${isOpen ? ' rotate-180' : ''} ${arrowIconClass}`} set:html={arrowIconSvg} />
49
49
  ) : (
50
- <svg class={`faq-arrow shrink-0 transition-transform duration-300${isOpen ? ' rotate-180' : ''}`} xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
51
- <path d="M3.19505 7.7455C3.47368 7.43901 3.94802 7.41642 4.25451 7.69505L12 14.7364L19.7455 7.69505C20.052 7.41642 20.5263 7.43901 20.805 7.7455C21.0836 8.05199 21.061 8.52633 20.7545 8.80496L12.5045 16.305C12.2184 16.565 11.7816 16.565 11.4955 16.305L3.2455 8.80496C2.93901 8.52633 2.91642 8.05199 3.19505 7.7455Z" fill-rule="evenodd" clip-rule="evenodd" fill="#403830"/>
50
+ <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">
51
+ <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"/>
52
52
  </svg>
53
53
  )}
54
54
  </button>
@@ -61,7 +61,7 @@ const structuredData = `<script type="application/ld+json">
61
61
  <Tag_2025_Bolonia tags={itemsTagPost.map((item) => item.tag)} tagsUrls={itemsTagPost.map((item) => item.url)} />
62
62
  </div>
63
63
  </div>
64
- <div class="w-full h-[364px] md:h-auto items-start self-stretch bg-gray-300 bg-cover bg-center bg-no-repeat" style={`background-image: url('${imageUrl}');`} ></div>
64
+ <div class="w-full h-[364px] md:h-auto items-start self-stretch bg-contain bg-center bg-no-repeat" style={`background-image: url('${imageUrl}');`} ></div>
65
65
  </div>
66
66
  ) : (
67
67
  <div class="w-full flex flex-col mx-auto items-center justify-center mb-8 md:pt-20">
@@ -48,7 +48,7 @@ const imageUrl = extractImageUrl(image);
48
48
  <Tag_2025_Bolonia tags={itemsTagPost.map((item) => item.tag)} tagsUrls={itemsTagPost.map((item) => item.url)} />
49
49
  </div>
50
50
  </div>
51
- <div class="w-full h-[364px] md:h-auto items-start self-stretch bg-gray-300 bg-cover bg-center bg-no-repeat" style={`background-image: url('${imageUrl}');`} ></div>
51
+ <div class="w-full h-[364px] md:h-auto items-start self-stretch bg-contain bg-center bg-no-repeat" style={`background-image: url('${imageUrl}');`} ></div>
52
52
  </div>
53
53
  ) : (
54
54
  <div class="w-full flex flex-col mx-auto items-center justify-center mb-8 md:pt-20">
@@ -8,8 +8,9 @@ const {
8
8
  descriptionWidth = "1/3", // 1/3 3/5 full
9
9
  flexJustify = "justify-center",
10
10
  subdescription = "",
11
+ fontFamily = "inter", // OBSOLETO: se ignora, la fuente se deduce de fontSize
11
12
  fontSize = "base", // sm | base | lg | xl | 2xl
12
- background = "transparent", // hex o 'transparent'
13
+ background = "#FFFFFF", // hex o 'transparent'
13
14
  } = Astro.props;
14
15
 
15
16
  // Fondo aplicado en línea (no como clase Tailwind) para que cualquier color del select funcione sin safelist.
@@ -18,19 +19,11 @@ const backgroundStyle = background && background !== 'transparent' ? `background
18
19
  // Regla de marca: 20px o más → font-heading (Serif); menos de 20px → font-body (Sans).
19
20
  const fontClass = fontSize === 'xl' || fontSize === '2xl' ? 'font-heading' : 'font-body';
20
21
 
21
- // El editor puede dejar HTML vacío (<p></p>, <br>, &nbsp;): se considera vacío si no queda texto.
22
- const hasText = (v) => !!v && v.replace(/<[^>]*>|&nbsp;/g, '').trim() !== '';
23
- const hasTitle = hasText(title);
24
- const hasSubtitle = hasText(h1Subtitle);
25
- // Sin título, el subtítulo pasa a ser el h1 de la página.
26
- const SubTag = hasTitle ? 'h2' : 'h1';
27
-
28
22
  ---
29
23
 
30
24
  <div class={`w-full md:w-3/5 max-w-auto flex ${flexJustify === 'justify-center' ? 'justify-center' : 'justify-start'} flex-col p-4 md:p-0 mx-auto`} style={backgroundStyle}>
31
25
  {
32
- !hasTitle ? null
33
- : hasSubtitle
26
+ h1Subtitle && h1Subtitle.trim() !== ""
34
27
  ? <h1 class="font-body text-[#262626] text-center text-base leading-6 font-normal rounded-sm bg-[#F2F3F8] mt-20 mb-8 w-fit py-2 px-3 mx-auto" set:html={title}></h1>
35
28
  : tipo === "h1" ? <h1 class="font-heading text-[#262626] text-[40px] md:text-[56px] font-normal text-center leading-[48px] md:leading-[64px] px-6 md:my-12" set:html={title}></h1>
36
29
  : tipo === "h1-40" ? <h1 class="font-heading text-[#262626] text-[36px] md:text-[40px] font-normal text-center leading-[44px] md:leading-[48px] mb-8" set:html={title}></h1>
@@ -48,11 +41,11 @@ const SubTag = hasTitle ? 'h2' : 'h1';
48
41
  : tipo === "h6" ? <h6 class="font-heading text-[#262626] text-center" set:html={title}></h6>
49
42
  : <p>{title}</p>
50
43
  }
51
- {hasSubtitle && (
52
- tipo === "h1" ? <SubTag class="font-heading text-[#262626] text-[40px] md:text-[56px] font-normal text-center leading-[48px] md:leading-[64px] px-6 md:mb-16" set:html={h1Subtitle}></SubTag>
53
- : tipo === "h2-mb24" ? <SubTag class="font-heading text-[#262626] text-[40px] md:text-[56px] font-normal text-center leading-[48px] md:leading-[64px] px-6 md:mb-8" set:html={h1Subtitle}></SubTag>
54
- : tipo === "h1-home" ? <SubTag class="font-heading text-[#262626] text-[40px] md:text-[56px] font-normal text-center leading-[48px] md:leading-[64px] mb-0 mt-8 md:mt-20" set:html={h1Subtitle}></SubTag>
55
- : tipo === "h1-40" ? <SubTag class="font-heading text-[#262626] text-[36px] md:text-[40px] font-normal text-center leading-[44px] md:leading-[48px] mb-0 md:mb-6" set:html={h1Subtitle}></SubTag>
44
+ {h1Subtitle && h1Subtitle.trim() !== "" && (
45
+ tipo === "h1" ? <h2 class="font-heading text-[#262626] text-[40px] md:text-[56px] font-normal text-center leading-[48px] md:leading-[64px] px-6 md:mb-16" set:html={h1Subtitle}></h2>
46
+ : tipo === "h2-mb24" ? <h2 class="font-heading text-[#262626] text-[40px] md:text-[56px] font-normal text-center leading-[48px] md:leading-[64px] px-6 md:mb-8" set:html={h1Subtitle}></h2>
47
+ : tipo === "h1-home" ? <h2 class="font-heading text-[#262626] text-[40px] md:text-[56px] font-normal text-center leading-[48px] md:leading-[64px] mb-0 mt-8 md:mt-20" set:html={h1Subtitle}></h2>
48
+ : tipo === "h1-40" ? <h2 class="font-heading text-[#262626] text-[36px] md:text-[40px] font-normal text-center leading-[44px] md:leading-[48px] mb-0 md:mb-6" set:html={h1Subtitle}></h2>
56
49
  : null
57
50
  )}
58
51
  {description && description.trim() !== "" && (