@lit-roa/hero 0.1.1 → 0.2.0
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/README.md +81 -68
- package/dist/hero.d.ts +10 -1
- package/dist/hero.d.ts.map +1 -1
- package/dist/hero.js +444 -411
- package/dist/hero.js.map +1 -1
- package/package.json +2 -2
- package/src/hero.ts +587 -556
- package/src/index.ts +2 -2
package/src/hero.ts
CHANGED
|
@@ -1,556 +1,587 @@
|
|
|
1
|
-
import { LitElement, css, html, nothing } from 'lit';
|
|
2
|
-
import { customElement, property, state } from 'lit/decorators.js';
|
|
3
|
-
import { emitir, estilosBase, tokens } from '@lit-roa/base';
|
|
4
|
-
import '@lit-roa/carrusel';
|
|
5
|
-
import type { DetalleCambioDiapositiva } from '@lit-roa/carrusel';
|
|
6
|
-
|
|
7
|
-
export interface BotonHero {
|
|
8
|
-
texto: string;
|
|
9
|
-
href: string;
|
|
10
|
-
/** `principal` (relleno, por omisión) o `secundario` (contorno). */
|
|
11
|
-
variante?: 'principal' | 'secundario';
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface AnuncioHero {
|
|
15
|
-
/** Identificador libre que viaja en `clic-hero`. */
|
|
16
|
-
id?: string;
|
|
17
|
-
titulo: string;
|
|
18
|
-
texto?: string;
|
|
19
|
-
/** Texto chico arriba del título (por ejemplo "Anuncio"). */
|
|
20
|
-
antetitulo?: string;
|
|
21
|
-
/** Etiqueta resaltada arriba del título (por ejemplo la fecha de un evento). */
|
|
22
|
-
etiqueta?: string;
|
|
23
|
-
imagen?: string;
|
|
24
|
-
/** Imagen para pantallas de hasta 640 px. */
|
|
25
|
-
imagenCelular?: string;
|
|
26
|
-
imagenAlt?: string;
|
|
27
|
-
/** Texto del botón; sin él no hay botón. */
|
|
28
|
-
boton?: string;
|
|
29
|
-
href?: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface DetalleClicHero {
|
|
33
|
-
/** `id` del anuncio; no viene en los botones de la bienvenida. */
|
|
34
|
-
id?: string;
|
|
35
|
-
href: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export type DisposicionHero = 'portada' | 'dividido' | 'escaparate';
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Carrusel principal de la página de inicio: siempre empieza con una
|
|
42
|
-
* diapositiva de bienvenida (antetítulo, título, texto, logo y hasta dos
|
|
43
|
-
* botones) y le siguen los anuncios. La portada de la tienda queda de fondo
|
|
44
|
-
* fijo de todo el carrusel; sin portada, un degradado del color principal.
|
|
45
|
-
*
|
|
46
|
-
* Tres disposiciones:
|
|
47
|
-
* - `portada` (por omisión): la portada a todo lo ancho; en los anuncios se
|
|
48
|
-
* tiñe del color principal y la imagen va en una tarjeta a la derecha. En
|
|
49
|
-
* celular los anuncios no muestran imagen.
|
|
50
|
-
* - `dividido`: la portada desenfocada de marco, el texto en una tarjeta
|
|
51
|
-
* blanca y la imagen al lado (arriba en celular).
|
|
52
|
-
* - `escaparate`: la portada desenfocada, la imagen nítida en una tarjeta y
|
|
53
|
-
* pestañas con el título de cada diapositiva y barra de avance.
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* @
|
|
59
|
-
|
|
60
|
-
@
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
.tinte::after {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
.tinte::
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
font-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
font-size: clamp(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
color:
|
|
217
|
-
}
|
|
218
|
-
.boton
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
.
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
color: var(--_color-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
}
|
|
278
|
-
:host([disposicion='dividido'])
|
|
279
|
-
color: var(--_color-
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
:host([disposicion='dividido']) .
|
|
283
|
-
|
|
284
|
-
color: var(--_color-
|
|
285
|
-
}
|
|
286
|
-
:host([disposicion='dividido']) .
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
:host([disposicion='dividido']) .imagen
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
left:
|
|
300
|
-
bottom:
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
:host([disposicion='escaparate']) .bienvenida
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
}
|
|
312
|
-
:host([disposicion='escaparate']) .bienvenida .
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
}
|
|
319
|
-
:host([disposicion='escaparate']) .
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
:
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
}
|
|
365
|
-
.
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}
|
|
384
|
-
:
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
flex:
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
:host([
|
|
397
|
-
justify-content: center;
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}
|
|
404
|
-
:host([disposicion='
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
${
|
|
496
|
-
? html`<
|
|
497
|
-
${
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
private
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
${
|
|
523
|
-
${
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
}
|
|
1
|
+
import { LitElement, css, html, nothing } from 'lit';
|
|
2
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
3
|
+
import { emitir, estilosBase, tokens } from '@lit-roa/base';
|
|
4
|
+
import '@lit-roa/carrusel';
|
|
5
|
+
import type { DetalleCambioDiapositiva } from '@lit-roa/carrusel';
|
|
6
|
+
|
|
7
|
+
export interface BotonHero {
|
|
8
|
+
texto: string;
|
|
9
|
+
href: string;
|
|
10
|
+
/** `principal` (relleno, por omisión) o `secundario` (contorno). */
|
|
11
|
+
variante?: 'principal' | 'secundario';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface AnuncioHero {
|
|
15
|
+
/** Identificador libre que viaja en `clic-hero`. */
|
|
16
|
+
id?: string;
|
|
17
|
+
titulo: string;
|
|
18
|
+
texto?: string;
|
|
19
|
+
/** Texto chico arriba del título (por ejemplo "Anuncio"). */
|
|
20
|
+
antetitulo?: string;
|
|
21
|
+
/** Etiqueta resaltada arriba del título (por ejemplo la fecha de un evento). */
|
|
22
|
+
etiqueta?: string;
|
|
23
|
+
imagen?: string;
|
|
24
|
+
/** Imagen para pantallas de hasta 640 px. */
|
|
25
|
+
imagenCelular?: string;
|
|
26
|
+
imagenAlt?: string;
|
|
27
|
+
/** Texto del botón; sin él no hay botón. */
|
|
28
|
+
boton?: string;
|
|
29
|
+
href?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface DetalleClicHero {
|
|
33
|
+
/** `id` del anuncio; no viene en los botones de la bienvenida. */
|
|
34
|
+
id?: string;
|
|
35
|
+
href: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type DisposicionHero = 'portada' | 'dividido' | 'escaparate';
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Carrusel principal de la página de inicio: siempre empieza con una
|
|
42
|
+
* diapositiva de bienvenida (antetítulo, título, texto, logo y hasta dos
|
|
43
|
+
* botones) y le siguen los anuncios. La portada de la tienda queda de fondo
|
|
44
|
+
* fijo de todo el carrusel; sin portada, un degradado del color principal.
|
|
45
|
+
*
|
|
46
|
+
* Tres disposiciones:
|
|
47
|
+
* - `portada` (por omisión): la portada a todo lo ancho; en los anuncios se
|
|
48
|
+
* tiñe del color principal y la imagen va en una tarjeta a la derecha. En
|
|
49
|
+
* celular los anuncios no muestran imagen.
|
|
50
|
+
* - `dividido`: la portada desenfocada de marco, el texto en una tarjeta
|
|
51
|
+
* blanca y la imagen al lado (arriba en celular).
|
|
52
|
+
* - `escaparate`: la portada desenfocada, la imagen nítida en una tarjeta y
|
|
53
|
+
* pestañas con el título de cada diapositiva y barra de avance.
|
|
54
|
+
*
|
|
55
|
+
* Con `ancho-completo` va de orilla a orilla (sin redondeo) y el contenido
|
|
56
|
+
* queda alineado con el ancho del sitio; se combina con cualquier disposición.
|
|
57
|
+
*
|
|
58
|
+
* @fires clic-hero - Al tocar un botón. `detail`: `{ id, href }`. El sitio navega.
|
|
59
|
+
* @cssprop --lr-hero-alto - Alto mínimo en escritorio (30rem; 34rem con `ancho-completo`).
|
|
60
|
+
* @cssprop --lr-hero-ancho-contenido - Ancho del contenido con `ancho-completo` (1160px).
|
|
61
|
+
* @cssprop --lr-hero-alto-celular - Alto mínimo en celular (32rem).
|
|
62
|
+
* @cssprop --lr-hero-acento - Color de la etiqueta de los anuncios (#facc15).
|
|
63
|
+
*/
|
|
64
|
+
@customElement('lr-hero')
|
|
65
|
+
export class LrHero extends LitElement {
|
|
66
|
+
static override styles = [
|
|
67
|
+
tokens,
|
|
68
|
+
estilosBase,
|
|
69
|
+
css`
|
|
70
|
+
:host {
|
|
71
|
+
display: block;
|
|
72
|
+
--_oscuro: color-mix(in srgb, var(--_color-primario), #000 50%);
|
|
73
|
+
--_acento: var(--lr-hero-acento, #facc15);
|
|
74
|
+
--_alto: var(--lr-hero-alto, 30rem);
|
|
75
|
+
}
|
|
76
|
+
.marco {
|
|
77
|
+
position: relative;
|
|
78
|
+
isolation: isolate;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
border-radius: var(--_radio);
|
|
81
|
+
background: linear-gradient(135deg, var(--_oscuro), var(--_color-primario));
|
|
82
|
+
color: #fff;
|
|
83
|
+
}
|
|
84
|
+
.fondo,
|
|
85
|
+
.tinte,
|
|
86
|
+
.tinte::before,
|
|
87
|
+
.tinte::after {
|
|
88
|
+
position: absolute;
|
|
89
|
+
inset: 0;
|
|
90
|
+
z-index: -1;
|
|
91
|
+
}
|
|
92
|
+
.fondo img {
|
|
93
|
+
width: 100%;
|
|
94
|
+
height: 100%;
|
|
95
|
+
object-fit: cover;
|
|
96
|
+
display: block;
|
|
97
|
+
}
|
|
98
|
+
:host([disposicion='dividido']) .fondo,
|
|
99
|
+
:host([disposicion='escaparate']) .fondo {
|
|
100
|
+
inset: -3rem;
|
|
101
|
+
filter: blur(32px) saturate(1.25);
|
|
102
|
+
}
|
|
103
|
+
.tinte::before,
|
|
104
|
+
.tinte::after {
|
|
105
|
+
content: '';
|
|
106
|
+
transition: opacity 0.6s;
|
|
107
|
+
}
|
|
108
|
+
.tinte::after {
|
|
109
|
+
opacity: 0;
|
|
110
|
+
}
|
|
111
|
+
.marco[data-activa='anuncio'] .tinte::before {
|
|
112
|
+
opacity: 0;
|
|
113
|
+
}
|
|
114
|
+
.marco[data-activa='anuncio'] .tinte::after {
|
|
115
|
+
opacity: 1;
|
|
116
|
+
}
|
|
117
|
+
/* Portada: velo oscuro del lado del texto en la bienvenida, color de la marca en los anuncios. */
|
|
118
|
+
.tinte::before {
|
|
119
|
+
background: linear-gradient(90deg, rgb(10 12 30 / 0.82) 0%, rgb(10 12 30 / 0.55) 45%, rgb(10 12 30 / 0) 80%);
|
|
120
|
+
}
|
|
121
|
+
.tinte::after {
|
|
122
|
+
background: linear-gradient(
|
|
123
|
+
105deg,
|
|
124
|
+
color-mix(in srgb, var(--_oscuro) 94%, transparent) 0%,
|
|
125
|
+
color-mix(in srgb, var(--_color-primario) 82%, transparent) 45%,
|
|
126
|
+
color-mix(in srgb, var(--_oscuro) 50%, transparent) 100%
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
:host([disposicion='dividido']) .tinte::before,
|
|
130
|
+
:host([disposicion='dividido']) .tinte::after,
|
|
131
|
+
:host([disposicion='escaparate']) .tinte::before,
|
|
132
|
+
:host([disposicion='escaparate']) .tinte::after {
|
|
133
|
+
background: rgb(10 12 30 / 0.45);
|
|
134
|
+
}
|
|
135
|
+
lr-carrusel {
|
|
136
|
+
--lr-carrusel-radio: 0;
|
|
137
|
+
--lr-carrusel-avance: var(--_acento);
|
|
138
|
+
/* El carrusel pone el color de texto del sitio; aquí manda el del hero. */
|
|
139
|
+
color: inherit;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* ---- Diapositivas ---- */
|
|
143
|
+
.diapositiva {
|
|
144
|
+
position: relative;
|
|
145
|
+
display: flex;
|
|
146
|
+
min-height: var(--_alto);
|
|
147
|
+
padding: clamp(1.5rem, 5vw, 4rem);
|
|
148
|
+
padding-bottom: max(clamp(1.5rem, 5vw, 4rem), var(--lr-carrusel-reserva-abajo, 0px));
|
|
149
|
+
gap: 3rem;
|
|
150
|
+
align-items: center;
|
|
151
|
+
}
|
|
152
|
+
.texto {
|
|
153
|
+
display: flex;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
align-items: flex-start;
|
|
156
|
+
gap: 1rem;
|
|
157
|
+
max-width: 36rem;
|
|
158
|
+
min-width: 0;
|
|
159
|
+
}
|
|
160
|
+
.antetitulo {
|
|
161
|
+
font-size: 0.8125rem;
|
|
162
|
+
font-weight: 800;
|
|
163
|
+
letter-spacing: 0.08em;
|
|
164
|
+
text-transform: uppercase;
|
|
165
|
+
color: var(--_acento);
|
|
166
|
+
}
|
|
167
|
+
.etiqueta {
|
|
168
|
+
display: inline-flex;
|
|
169
|
+
padding: 0.375rem 0.75rem;
|
|
170
|
+
border-radius: 999px;
|
|
171
|
+
background: var(--_acento);
|
|
172
|
+
color: #1f2937;
|
|
173
|
+
font-size: 0.8125rem;
|
|
174
|
+
font-weight: 700;
|
|
175
|
+
}
|
|
176
|
+
h2 {
|
|
177
|
+
margin: 0;
|
|
178
|
+
font-size: clamp(1.875rem, 4.5vw, 3.25rem);
|
|
179
|
+
line-height: 1.06;
|
|
180
|
+
font-weight: 800;
|
|
181
|
+
letter-spacing: -0.02em;
|
|
182
|
+
text-wrap: balance;
|
|
183
|
+
}
|
|
184
|
+
.anuncio h2 {
|
|
185
|
+
font-size: clamp(1.75rem, 4vw, 2.875rem);
|
|
186
|
+
}
|
|
187
|
+
p {
|
|
188
|
+
margin: 0;
|
|
189
|
+
font-size: clamp(1rem, 1.8vw, 1.1875rem);
|
|
190
|
+
line-height: 1.5;
|
|
191
|
+
opacity: 0.92;
|
|
192
|
+
}
|
|
193
|
+
.botones {
|
|
194
|
+
display: flex;
|
|
195
|
+
flex-wrap: wrap;
|
|
196
|
+
gap: 0.75rem;
|
|
197
|
+
margin-top: 0.5rem;
|
|
198
|
+
}
|
|
199
|
+
.boton {
|
|
200
|
+
display: inline-flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
justify-content: center;
|
|
203
|
+
height: 3rem;
|
|
204
|
+
padding: 0 1.375rem;
|
|
205
|
+
border-radius: calc(var(--_radio) / 1.5);
|
|
206
|
+
font-weight: 700;
|
|
207
|
+
text-decoration: none;
|
|
208
|
+
white-space: nowrap;
|
|
209
|
+
background: var(--_color-primario);
|
|
210
|
+
color: var(--_color-sobre-primario);
|
|
211
|
+
border: 1.5px solid transparent;
|
|
212
|
+
}
|
|
213
|
+
.boton.secundario {
|
|
214
|
+
background: transparent;
|
|
215
|
+
color: #fff;
|
|
216
|
+
border-color: rgb(255 255 255 / 0.85);
|
|
217
|
+
}
|
|
218
|
+
.anuncio .boton {
|
|
219
|
+
background: #fff;
|
|
220
|
+
color: #111827;
|
|
221
|
+
}
|
|
222
|
+
.boton:hover {
|
|
223
|
+
filter: brightness(0.94);
|
|
224
|
+
}
|
|
225
|
+
.boton:focus-visible {
|
|
226
|
+
outline: 2px solid #fff;
|
|
227
|
+
outline-offset: 3px;
|
|
228
|
+
}
|
|
229
|
+
.imagen {
|
|
230
|
+
position: relative;
|
|
231
|
+
flex: 1 1 0;
|
|
232
|
+
align-self: stretch;
|
|
233
|
+
min-width: 0;
|
|
234
|
+
max-height: calc(var(--_alto) - 5rem);
|
|
235
|
+
border-radius: calc(var(--_radio) * 1.25);
|
|
236
|
+
overflow: hidden;
|
|
237
|
+
box-shadow: 0 24px 60px rgb(0 0 0 / 0.4), 0 0 0 1px rgb(255 255 255 / 0.15);
|
|
238
|
+
}
|
|
239
|
+
.imagen img:not(.logo) {
|
|
240
|
+
position: absolute;
|
|
241
|
+
inset: 0;
|
|
242
|
+
width: 100%;
|
|
243
|
+
height: 100%;
|
|
244
|
+
object-fit: cover;
|
|
245
|
+
}
|
|
246
|
+
.anuncio .texto {
|
|
247
|
+
flex: 1 1 0;
|
|
248
|
+
}
|
|
249
|
+
.logo {
|
|
250
|
+
width: 5.25rem;
|
|
251
|
+
height: 5.25rem;
|
|
252
|
+
border-radius: 1.25rem;
|
|
253
|
+
object-fit: contain;
|
|
254
|
+
background: #fff;
|
|
255
|
+
box-shadow: 0 10px 30px rgb(0 0 0 / 0.3);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/* ---- Dividido ---- */
|
|
259
|
+
:host([disposicion='dividido']) .diapositiva {
|
|
260
|
+
padding: 1.75rem;
|
|
261
|
+
padding-bottom: max(1.75rem, var(--lr-carrusel-reserva-abajo, 0px));
|
|
262
|
+
gap: 1.5rem;
|
|
263
|
+
align-items: stretch;
|
|
264
|
+
}
|
|
265
|
+
:host([disposicion='dividido']) .texto {
|
|
266
|
+
flex: 1 1 0;
|
|
267
|
+
max-width: none;
|
|
268
|
+
justify-content: center;
|
|
269
|
+
padding: clamp(1.5rem, 4vw, 3rem);
|
|
270
|
+
border-radius: calc(var(--_radio) * 1.25);
|
|
271
|
+
background: #fff;
|
|
272
|
+
color: var(--_color-texto);
|
|
273
|
+
box-shadow: 0 20px 50px rgb(0 0 0 / 0.3);
|
|
274
|
+
}
|
|
275
|
+
:host([disposicion='dividido']) .antetitulo {
|
|
276
|
+
color: var(--_color-primario);
|
|
277
|
+
}
|
|
278
|
+
:host([disposicion='dividido']) p {
|
|
279
|
+
color: var(--_color-texto-suave);
|
|
280
|
+
opacity: 1;
|
|
281
|
+
}
|
|
282
|
+
:host([disposicion='dividido']) .boton.secundario {
|
|
283
|
+
color: var(--_color-primario);
|
|
284
|
+
border-color: var(--_color-primario);
|
|
285
|
+
}
|
|
286
|
+
:host([disposicion='dividido']) .anuncio .boton {
|
|
287
|
+
background: var(--_color-primario);
|
|
288
|
+
color: var(--_color-sobre-primario);
|
|
289
|
+
}
|
|
290
|
+
:host([disposicion='dividido']) .imagen {
|
|
291
|
+
max-height: none;
|
|
292
|
+
box-shadow: 0 20px 50px rgb(0 0 0 / 0.35);
|
|
293
|
+
}
|
|
294
|
+
:host([disposicion='dividido']) .imagen.sin-imagen {
|
|
295
|
+
background: linear-gradient(135deg, var(--_oscuro), var(--_color-primario));
|
|
296
|
+
}
|
|
297
|
+
:host([disposicion='dividido']) .imagen .logo {
|
|
298
|
+
position: absolute;
|
|
299
|
+
left: 1.5rem;
|
|
300
|
+
bottom: 1.5rem;
|
|
301
|
+
}
|
|
302
|
+
:host([disposicion='dividido']) .imagen.sin-imagen .logo {
|
|
303
|
+
left: calc(50% - 2.625rem);
|
|
304
|
+
bottom: calc(50% - 2.625rem);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/* ---- Escaparate ---- */
|
|
308
|
+
:host([disposicion='escaparate']) .bienvenida {
|
|
309
|
+
justify-content: center;
|
|
310
|
+
text-align: center;
|
|
311
|
+
}
|
|
312
|
+
:host([disposicion='escaparate']) .bienvenida .texto {
|
|
313
|
+
align-items: center;
|
|
314
|
+
max-width: 40rem;
|
|
315
|
+
}
|
|
316
|
+
:host([disposicion='escaparate']) .bienvenida .botones {
|
|
317
|
+
justify-content: center;
|
|
318
|
+
}
|
|
319
|
+
:host([disposicion='escaparate']) .bienvenida .boton.principal {
|
|
320
|
+
background: #fff;
|
|
321
|
+
color: #111827;
|
|
322
|
+
}
|
|
323
|
+
:host([disposicion='escaparate']) .imagen {
|
|
324
|
+
flex: 0 1 46%;
|
|
325
|
+
align-self: center;
|
|
326
|
+
aspect-ratio: 3 / 2;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* ---- Ancho completo ---- */
|
|
330
|
+
:host([ancho-completo]) {
|
|
331
|
+
--_alto: var(--lr-hero-alto, 34rem);
|
|
332
|
+
--_lateral: max(0px, calc((100% - var(--lr-hero-ancho-contenido, 1160px)) / 2));
|
|
333
|
+
}
|
|
334
|
+
:host([ancho-completo]) .marco {
|
|
335
|
+
border-radius: 0;
|
|
336
|
+
}
|
|
337
|
+
:host([ancho-completo]) lr-carrusel {
|
|
338
|
+
--lr-carrusel-pestanas-relleno: var(--_lateral);
|
|
339
|
+
}
|
|
340
|
+
@media (min-width: 641px) {
|
|
341
|
+
/* El contenido se alinea con el ancho del sitio; el fondo llega a las orillas. */
|
|
342
|
+
:host([ancho-completo]) .diapositiva {
|
|
343
|
+
padding-inline: max(clamp(1.5rem, 5vw, 4rem), calc(var(--_lateral) + 1rem));
|
|
344
|
+
}
|
|
345
|
+
:host([ancho-completo][disposicion='dividido']) .diapositiva {
|
|
346
|
+
padding-inline: max(1.75rem, calc(var(--_lateral) + 1rem));
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
@media (max-width: 640px) {
|
|
351
|
+
:host {
|
|
352
|
+
--_alto: var(--lr-hero-alto-celular, 32rem);
|
|
353
|
+
}
|
|
354
|
+
.diapositiva {
|
|
355
|
+
flex-direction: column;
|
|
356
|
+
justify-content: flex-end;
|
|
357
|
+
align-items: stretch;
|
|
358
|
+
gap: 1.25rem;
|
|
359
|
+
padding: 1.5rem 1.375rem;
|
|
360
|
+
padding-bottom: max(1.5rem, var(--lr-carrusel-reserva-abajo, 0px));
|
|
361
|
+
}
|
|
362
|
+
.tinte::before {
|
|
363
|
+
background: linear-gradient(0deg, rgb(10 12 30 / 0.92) 0%, rgb(10 12 30 / 0.6) 45%, rgb(10 12 30 / 0.05) 85%);
|
|
364
|
+
}
|
|
365
|
+
.tinte::after {
|
|
366
|
+
background: linear-gradient(
|
|
367
|
+
0deg,
|
|
368
|
+
color-mix(in srgb, var(--_oscuro) 96%, transparent) 0%,
|
|
369
|
+
color-mix(in srgb, var(--_color-primario) 85%, transparent) 50%,
|
|
370
|
+
color-mix(in srgb, var(--_oscuro) 55%, transparent) 100%
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
.texto,
|
|
374
|
+
.anuncio .texto {
|
|
375
|
+
flex: none;
|
|
376
|
+
}
|
|
377
|
+
.botones {
|
|
378
|
+
flex-direction: column;
|
|
379
|
+
align-self: stretch;
|
|
380
|
+
}
|
|
381
|
+
.boton {
|
|
382
|
+
width: 100%;
|
|
383
|
+
}
|
|
384
|
+
/* Portada: los anuncios no muestran imagen en celular. */
|
|
385
|
+
:host(:not([disposicion])) .anuncio .imagen,
|
|
386
|
+
:host([disposicion='portada']) .anuncio .imagen,
|
|
387
|
+
:host([ocultar-imagen-celular]) .anuncio .imagen {
|
|
388
|
+
display: none;
|
|
389
|
+
}
|
|
390
|
+
.imagen {
|
|
391
|
+
flex: none;
|
|
392
|
+
order: -1;
|
|
393
|
+
height: 9.5rem;
|
|
394
|
+
max-height: none;
|
|
395
|
+
}
|
|
396
|
+
:host([disposicion='escaparate']) .diapositiva {
|
|
397
|
+
justify-content: center;
|
|
398
|
+
text-align: center;
|
|
399
|
+
}
|
|
400
|
+
:host([disposicion='escaparate']) .texto {
|
|
401
|
+
align-items: center;
|
|
402
|
+
align-self: center;
|
|
403
|
+
}
|
|
404
|
+
:host([disposicion='escaparate']) .imagen {
|
|
405
|
+
flex: none;
|
|
406
|
+
aspect-ratio: auto;
|
|
407
|
+
align-self: stretch;
|
|
408
|
+
}
|
|
409
|
+
:host([disposicion='dividido']) .diapositiva {
|
|
410
|
+
gap: 0;
|
|
411
|
+
padding: 0.875rem;
|
|
412
|
+
padding-bottom: max(0.875rem, var(--lr-carrusel-reserva-abajo, 0px));
|
|
413
|
+
justify-content: flex-start;
|
|
414
|
+
}
|
|
415
|
+
:host([disposicion='dividido']) .texto {
|
|
416
|
+
flex: 1 0 auto;
|
|
417
|
+
justify-content: flex-start;
|
|
418
|
+
padding: 1.25rem;
|
|
419
|
+
}
|
|
420
|
+
:host([disposicion='dividido']) .anuncio:not(:has(.imagen)) .texto,
|
|
421
|
+
:host([ocultar-imagen-celular][disposicion='dividido']) .anuncio .texto {
|
|
422
|
+
justify-content: center;
|
|
423
|
+
}
|
|
424
|
+
:host([disposicion='dividido']) .imagen {
|
|
425
|
+
height: 11rem;
|
|
426
|
+
border-radius: calc(var(--_radio) * 1.25) calc(var(--_radio) * 1.25) 0 0;
|
|
427
|
+
box-shadow: none;
|
|
428
|
+
}
|
|
429
|
+
:host([disposicion='dividido']) .imagen + .texto,
|
|
430
|
+
:host([disposicion='dividido']) .texto:has(+ .imagen) {
|
|
431
|
+
border-radius: 0 0 calc(var(--_radio) * 1.25) calc(var(--_radio) * 1.25);
|
|
432
|
+
}
|
|
433
|
+
:host([ocultar-imagen-celular][disposicion='dividido']) .anuncio .texto {
|
|
434
|
+
border-radius: calc(var(--_radio) * 1.25);
|
|
435
|
+
}
|
|
436
|
+
:host([disposicion='dividido']) .imagen .logo {
|
|
437
|
+
width: 4rem;
|
|
438
|
+
height: 4rem;
|
|
439
|
+
border-radius: 0.875rem;
|
|
440
|
+
left: 1rem;
|
|
441
|
+
bottom: 1rem;
|
|
442
|
+
}
|
|
443
|
+
:host([disposicion='dividido']) .imagen.sin-imagen .logo {
|
|
444
|
+
left: calc(50% - 2rem);
|
|
445
|
+
bottom: calc(50% - 2rem);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
`,
|
|
449
|
+
];
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* A todo lo ancho de la pantalla, sin esquinas redondeadas; el contenido se
|
|
453
|
+
* alinea con `--lr-hero-ancho-contenido`. El sitio lo pone fuera de su contenedor.
|
|
454
|
+
*/
|
|
455
|
+
@property({ type: Boolean, reflect: true, attribute: 'ancho-completo' }) anchoCompleto = false;
|
|
456
|
+
|
|
457
|
+
@property({ reflect: true }) disposicion: DisposicionHero = 'portada';
|
|
458
|
+
|
|
459
|
+
/** Portada de la tienda: fondo fijo de todo el carrusel. */
|
|
460
|
+
@property() portada = '';
|
|
461
|
+
|
|
462
|
+
/** Portada para pantallas de hasta 640 px. */
|
|
463
|
+
@property({ attribute: 'portada-celular' }) portadaCelular = '';
|
|
464
|
+
|
|
465
|
+
/** Logo de la tienda (bienvenida de `dividido` y `escaparate`). */
|
|
466
|
+
@property() logo = '';
|
|
467
|
+
|
|
468
|
+
@property({ attribute: 'logo-alt' }) logoAlt = '';
|
|
469
|
+
|
|
470
|
+
@property() antetitulo = '';
|
|
471
|
+
|
|
472
|
+
@property() titulo = '';
|
|
473
|
+
|
|
474
|
+
@property() texto = '';
|
|
475
|
+
|
|
476
|
+
/** Hasta dos botones de la bienvenida (por ejemplo Productos y Eventos). */
|
|
477
|
+
@property({ attribute: false }) botones: BotonHero[] = [];
|
|
478
|
+
|
|
479
|
+
@property({ attribute: false }) anuncios: AnuncioHero[] = [];
|
|
480
|
+
|
|
481
|
+
/** Milisegundos entre diapositivas; `0` = no avanza solo. */
|
|
482
|
+
@property({ type: Number }) intervalo = 7000;
|
|
483
|
+
|
|
484
|
+
/** Oculta la imagen de los anuncios en celular también en `dividido` y `escaparate`. */
|
|
485
|
+
@property({ type: Boolean, reflect: true, attribute: 'ocultar-imagen-celular' }) ocultarImagenCelular = false;
|
|
486
|
+
|
|
487
|
+
@property() etiqueta = 'Inicio';
|
|
488
|
+
|
|
489
|
+
@state() private activa = 0;
|
|
490
|
+
|
|
491
|
+
override render() {
|
|
492
|
+
const escaparate = this.disposicion === 'escaparate';
|
|
493
|
+
return html`
|
|
494
|
+
<div class="marco" data-activa=${this.activa === 0 ? 'bienvenida' : 'anuncio'}>
|
|
495
|
+
${this.portada
|
|
496
|
+
? html`<picture class="fondo" aria-hidden="true">
|
|
497
|
+
${this.portadaCelular ? html`<source media="(max-width: 640px)" srcset=${this.portadaCelular} />` : nothing}
|
|
498
|
+
<img src=${this.portada} alt="" fetchpriority="high" />
|
|
499
|
+
</picture>`
|
|
500
|
+
: nothing}
|
|
501
|
+
<div class="tinte" aria-hidden="true"></div>
|
|
502
|
+
<lr-carrusel
|
|
503
|
+
etiqueta=${this.etiqueta}
|
|
504
|
+
intervalo=${this.intervalo}
|
|
505
|
+
?puntos-encima=${!escaparate}
|
|
506
|
+
?pestanas=${escaparate}
|
|
507
|
+
efecto=${escaparate ? 'desvanecer' : 'deslizar'}
|
|
508
|
+
@cambio-diapositiva=${this.alCambiar}
|
|
509
|
+
>
|
|
510
|
+
${this.bienvenida()} ${this.anuncios.map((a) => this.anuncio(a))}
|
|
511
|
+
</lr-carrusel>
|
|
512
|
+
</div>
|
|
513
|
+
`;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
private bienvenida() {
|
|
517
|
+
const dividido = this.disposicion === 'dividido';
|
|
518
|
+
const logo = this.logo ? html`<img class="logo" src=${this.logo} alt=${this.logoAlt} />` : nothing;
|
|
519
|
+
const botones = this.botones.slice(0, 2);
|
|
520
|
+
return html`<article class="diapositiva bienvenida" data-pestana=${this.titulo || 'Bienvenida'} data-pestana-detalle="Inicio">
|
|
521
|
+
<div class="texto">
|
|
522
|
+
${this.disposicion === 'escaparate' ? logo : nothing}
|
|
523
|
+
${this.antetitulo ? html`<span class="antetitulo">${this.antetitulo}</span>` : nothing}
|
|
524
|
+
${this.titulo ? html`<h2>${this.titulo}</h2>` : nothing}
|
|
525
|
+
${this.texto ? html`<p>${this.texto}</p>` : nothing}
|
|
526
|
+
${botones.length
|
|
527
|
+
? html`<div class="botones">
|
|
528
|
+
${botones.map(
|
|
529
|
+
(b, i) => html`<a
|
|
530
|
+
class="boton ${b.variante ?? (i === 0 ? 'principal' : 'secundario')}"
|
|
531
|
+
href=${b.href}
|
|
532
|
+
@click=${(e: MouseEvent) => this.alClic(e, b.href)}
|
|
533
|
+
>${b.texto}</a
|
|
534
|
+
>`
|
|
535
|
+
)}
|
|
536
|
+
</div>`
|
|
537
|
+
: nothing}
|
|
538
|
+
</div>
|
|
539
|
+
${dividido
|
|
540
|
+
? html`<div class="imagen ${this.portada ? '' : 'sin-imagen'}">
|
|
541
|
+
${this.portada ? html`<img src=${this.portadaCelular || this.portada} alt="" />` : nothing} ${logo}
|
|
542
|
+
</div>`
|
|
543
|
+
: nothing}
|
|
544
|
+
</article>`;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
private anuncio(a: AnuncioHero) {
|
|
548
|
+
return html`<article class="diapositiva anuncio" data-pestana=${a.titulo} data-pestana-detalle=${a.etiqueta || a.antetitulo || 'Anuncio'}>
|
|
549
|
+
<div class="texto">
|
|
550
|
+
${a.etiqueta ? html`<span class="etiqueta">${a.etiqueta}</span>` : nothing}
|
|
551
|
+
${a.antetitulo ? html`<span class="antetitulo">${a.antetitulo}</span>` : nothing}
|
|
552
|
+
<h2>${a.titulo}</h2>
|
|
553
|
+
${a.texto ? html`<p>${a.texto}</p>` : nothing}
|
|
554
|
+
${a.boton && a.href
|
|
555
|
+
? html`<div class="botones">
|
|
556
|
+
<a class="boton" href=${a.href} @click=${(e: MouseEvent) => this.alClic(e, a.href!, a.id)}>${a.boton}</a>
|
|
557
|
+
</div>`
|
|
558
|
+
: nothing}
|
|
559
|
+
</div>
|
|
560
|
+
${a.imagen
|
|
561
|
+
? html`<div class="imagen">
|
|
562
|
+
<picture>
|
|
563
|
+
${a.imagenCelular ? html`<source media="(max-width: 640px)" srcset=${a.imagenCelular} />` : nothing}
|
|
564
|
+
<img src=${a.imagen} alt=${a.imagenAlt ?? ''} loading="lazy" />
|
|
565
|
+
</picture>
|
|
566
|
+
</div>`
|
|
567
|
+
: nothing}
|
|
568
|
+
</article>`;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
private alCambiar(evento: CustomEvent<DetalleCambioDiapositiva>) {
|
|
572
|
+
evento.stopPropagation();
|
|
573
|
+
this.activa = evento.detail.indice;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
private alClic(evento: MouseEvent, href: string, id?: string) {
|
|
577
|
+
if (evento.ctrlKey || evento.metaKey) return;
|
|
578
|
+
evento.preventDefault();
|
|
579
|
+
emitir<DetalleClicHero>(this, 'clic-hero', { id, href });
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
declare global {
|
|
584
|
+
interface HTMLElementTagNameMap {
|
|
585
|
+
'lr-hero': LrHero;
|
|
586
|
+
}
|
|
587
|
+
}
|