kupos-ui-components-lib 9.7.0 → 9.7.2

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.
Files changed (26) hide show
  1. package/dist/KuposUIComponent.d.ts +3 -0
  2. package/dist/assets/images/anims/service_list/users_anim.json +1 -0
  3. package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
  4. package/dist/components/ServiceItem/ServiceItemDesktop.js +10 -2
  5. package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
  6. package/dist/components/ServiceItem/ServiceItemMobile.js +16 -7
  7. package/dist/components/ServiceItem/mobileTypes.d.ts +27 -0
  8. package/dist/components/ServiceItem/types.d.ts +10 -0
  9. package/dist/styles.css +62 -14
  10. package/dist/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.d.ts +18 -0
  11. package/dist/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.js +233 -0
  12. package/dist/ui/FeatureServiceUI/FeatureServiceUi.d.ts +7 -2
  13. package/dist/ui/FeatureServiceUI/FeatureServiceUi.js +109 -92
  14. package/dist/ui/SeatSection/SeatSection.js +1 -1
  15. package/dist/utils/CommonService.js +11 -1
  16. package/package.json +1 -1
  17. package/src/KuposUIComponent.tsx +3 -0
  18. package/src/assets/images/anims/service_list/users_anim.json +1 -0
  19. package/src/components/ServiceItem/ServiceItemDesktop.tsx +23 -1
  20. package/src/components/ServiceItem/ServiceItemMobile.tsx +331 -286
  21. package/src/components/ServiceItem/mobileTypes.ts +22 -0
  22. package/src/components/ServiceItem/types.ts +11 -1
  23. package/src/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.tsx +790 -0
  24. package/src/ui/FeatureServiceUI/FeatureServiceUi.tsx +181 -253
  25. package/src/ui/SeatSection/SeatSection.tsx +1 -1
  26. package/src/utils/CommonService.ts +13 -1
@@ -0,0 +1,790 @@
1
+ import React from "react";
2
+ import LottiePlayer from "../../assets/LottiePlayer";
3
+ import commonService from "../../utils/CommonService";
4
+
5
+ const HARDCODED_OPERATORS = [
6
+ {
7
+ logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Turbus_logo.svg/320px-Turbus_logo.svg.png",
8
+ name: "Turbus",
9
+ time: "7:00 am",
10
+ seatsAvailable: "3 disponibles",
11
+ },
12
+ {
13
+ logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Pullman_Bus_logo.svg/320px-Pullman_Bus_logo.svg.png",
14
+ name: "Pullmanbus",
15
+ time: "8:00 am",
16
+ seatsAvailable: "5 disponibles",
17
+ },
18
+ {
19
+ logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Turbus_logo.svg/320px-Turbus_logo.svg.png",
20
+ name: "Expreso Santa C...",
21
+ time: "9:00 am",
22
+ seatsAvailable: "3 disponibles",
23
+ },
24
+ ];
25
+
26
+ const HARDCODED_COUNTDOWN = "09:55";
27
+
28
+ const HOW_IT_WORKS_STEPS = [
29
+ {
30
+ icon: "flexible",
31
+ name: "1. Salida flexible",
32
+ text: "Viajas en un horario entre las 07:00 y las 10:00 AM del día elegido.",
33
+ },
34
+ {
35
+ icon: "bus",
36
+ name: "2. Empresa asignada",
37
+ text: "Una de las empresas disponibles confirma tu viaje una vez pagado.",
38
+ },
39
+ {
40
+ icon: "price",
41
+ name: "3. Precio garantizado",
42
+ text: "Al seleccionar este servicio aseguras el precio reducido.",
43
+ },
44
+ {
45
+ icon: "ticket",
46
+ name: "4. ¡Listo!",
47
+ text: "Recibe todos los detalles de tu viaje al instante tras la compra.",
48
+ },
49
+ ];
50
+
51
+ const FeatureServiceUiMobile = ({
52
+ serviceItem,
53
+ showTopLabel,
54
+ colors,
55
+ isSoldOut,
56
+ cityOrigin,
57
+ cityDestination,
58
+ renderIcon,
59
+ viewersConfig,
60
+ isFeatureDropDownExpand,
61
+ onToggleExpand,
62
+ ticketQuantity = 1,
63
+ onIncreaseTicketQuantity,
64
+ onDecreaseTicketQuantity,
65
+ onBookButtonPress,
66
+ }) => {
67
+ const operators =
68
+ serviceItem?.operators?.length > 0
69
+ ? serviceItem.operators
70
+ : HARDCODED_OPERATORS;
71
+
72
+ const isItemExpanded =
73
+ serviceItem.id === isFeatureDropDownExpand ||
74
+ isFeatureDropDownExpand === true;
75
+ const canDecreaseTicketQuantity = ticketQuantity > 1;
76
+
77
+ const HOW_IT_WORKS_STEPS = [
78
+ {
79
+ icon: "flexible",
80
+ name: "1. Salida flexible",
81
+ text: "Viajas en un horario entre las 07:00 y las 10:00 AM del día elegido.",
82
+ },
83
+ {
84
+ icon: "bus",
85
+ name: "2. Empresa asignada",
86
+ text: "Una de las empresas disponibles confirma tu viaje una vez pagado.",
87
+ },
88
+ {
89
+ icon: "price",
90
+ name: "3. Precio garantizado",
91
+ text: "Al seleccionar este servicio aseguras el precio reducido.",
92
+ },
93
+ {
94
+ icon: "ticket",
95
+ name: "4. ¡Listo!",
96
+ text: "Recibe todos los detalles de tu viaje al instante tras la compra.",
97
+ },
98
+ ];
99
+
100
+ const FeatureStepIcon = ({ icon }) => {
101
+ switch (icon) {
102
+ case "flexible":
103
+ return renderIcon("flexibleIcon", "20px");
104
+ case "bus":
105
+ return renderIcon("empressaIcon", "20px");
106
+ case "price":
107
+ return renderIcon("precioIcon", "20px");
108
+ default:
109
+ return renderIcon("listoIcon", "20px");
110
+ }
111
+ };
112
+
113
+ return (
114
+ <div
115
+ // ${
116
+ // serviceItem.offer_text ? "mb-[55px]" : "mb-[10px]"
117
+ // }
118
+ className={`relative mb-[10px]
119
+ ${
120
+ serviceItem?.is_direct_trip ||
121
+ serviceItem?.train_type_label === "Tren Express (Nuevo)" ||
122
+ showTopLabel
123
+ ? "mt-[24px]"
124
+ : "mt-[20px]"
125
+ }`}
126
+ >
127
+ <div
128
+ className=""
129
+ style={{
130
+ border: "1px solid #c0c0c0",
131
+ padding: "12px",
132
+ borderRadius: "14px",
133
+ }}
134
+ >
135
+ <div
136
+ id={`service-card-${serviceItem.id}`}
137
+ className="bg-[#0C1421] text-white mx-auto relative rounded-[14px] p-[14px] text-[13.33px]"
138
+ >
139
+ <div className="flex flex-col gap-[10px]">
140
+ <div className="flex justify-between items-center text-[white]">
141
+ <div className="flex flex-col gap-[8px]">
142
+ <div className="flex items-center gap-[8px]">
143
+ <img
144
+ src={serviceItem.icons?.whiteOrigin}
145
+ alt="origin"
146
+ className={`w-[14px] h-[14px] shrink-0 ${
147
+ isSoldOut ? "grayscale" : ""
148
+ }`}
149
+ />
150
+ <span className="text-[13px] bold-text">
151
+ {cityOrigin?.label.split(",")[0]}
152
+ </span>
153
+ </div>
154
+ <div className="flex items-center gap-[8px]">
155
+ <img
156
+ src={serviceItem.icons?.whiteDestination}
157
+ alt="destination"
158
+ className={`w-[14px] h-[14px] shrink-0 ${
159
+ isSoldOut ? "grayscale" : ""
160
+ }`}
161
+ style={{ opacity: isSoldOut ? 0.5 : 1 }}
162
+ />
163
+ <span className="text-[13px] bold-text">
164
+ {cityDestination?.label.split(",")[0]}
165
+ </span>
166
+ </div>
167
+ </div>
168
+ <div className="flex flex-col justify-end gap-[12px] relative mb-[16px]">
169
+ <div className="flex flex-col gap-[3px] items-end">
170
+ <span
171
+ className="text-[#FF8F45] bold-text text-[16px] leading-tight"
172
+ style={{
173
+ animation: "pulse-zoom 2s ease-in-out infinite",
174
+ whiteSpace: "nowrap",
175
+ }}
176
+ >
177
+ 60% OFF
178
+ </span>
179
+
180
+ <span
181
+ className="text-[13.33px] font-normal leading-[20px] text-[#9f9f9f] relative"
182
+ style={{ position: "relative" }}
183
+ >
184
+ $10.000
185
+ <span
186
+ style={{
187
+ position: "absolute",
188
+ left: "-2px",
189
+ top: "50%",
190
+ width: "calc(100% + 4px)",
191
+ height: "1px",
192
+
193
+ backgroundColor: "#FF5C60",
194
+
195
+ transform: "rotate(-10deg)",
196
+ transformOrigin: "center",
197
+ }}
198
+ />
199
+ </span>
200
+ <span className="text-white bold-text text-[22px] leading-none">
201
+ {`$${(4000 * ticketQuantity).toLocaleString()}`}
202
+ </span>
203
+ </div>
204
+ </div>
205
+ </div>
206
+
207
+ <div>
208
+ <div className="flex items-center text-[white]">
209
+ <span>Vie, 04/11</span>
210
+ <span className="h-[20px] flex items-center justify-center mx-[10px]">
211
+
212
+ </span>
213
+ <span>07:00 AM - 10:00 AM</span>
214
+ </div>
215
+ <div
216
+ style={{
217
+ // height: "80px",
218
+ border: "1px solid #363c48",
219
+ backgroundColor: "#1a202e",
220
+ padding: "14px 10px",
221
+ borderRadius: "14px",
222
+ marginTop: "14px",
223
+ }}
224
+ >
225
+ <div className="flex flex-col justify-center items-center text-[white]">
226
+ <span className="text-[15px] bold-text">
227
+ 3 operadores compitiendo por tu compra
228
+ </span>
229
+
230
+ <span className="mt-[8px]">
231
+ Empresa a confirmar después de tu pago
232
+ </span>
233
+ </div>
234
+ <div className="grid w-full grid-cols-3 items-stretch gap-[14px] mb-[12px] mt-[12px] text-[white]">
235
+ {operators.map((op, idx) => (
236
+ <div
237
+ key={idx}
238
+ className="flex min-w-0 flex-col items-center justify-center gap-[8px] rounded-[8px]"
239
+ style={{
240
+ // height: "80px",
241
+ border: "1px solid #363c48",
242
+ backgroundColor: "#1a202e",
243
+ padding: "14px 10px",
244
+ }}
245
+ >
246
+ <img
247
+ src={serviceItem.operator_details[0]}
248
+ alt={op.name}
249
+ className={`h-[24px] max-w-full object-contain ${
250
+ isSoldOut ? "grayscale" : ""
251
+ }`}
252
+ />
253
+ <span className="text-[11px] truncate max-w-full text-center">
254
+ {serviceItem.operator_details[2]}
255
+ </span>
256
+ <div className="bg-[#FF8F45] text-[12px] font-bold px-[10px] py-[4px] rounded-[4px] bold-text whitespace-nowrap">
257
+ <span>{op?.time}</span>
258
+ </div>
259
+ <span className="text-[10px] mt-[6px]">
260
+ {op?.seatsAvailable}
261
+ </span>
262
+ </div>
263
+ ))}
264
+ </div>
265
+ <div className="flex items-center gap-[4px]">
266
+ {renderIcon("sheildIcon", "14px")}
267
+ <span className="text-[white]">
268
+ Tu asiento confirmado al instante.
269
+ </span>
270
+ </div>
271
+ </div>
272
+ </div>
273
+ <div>
274
+ <div className="mt-[4px] flex flex-col items-center gap-[8px]">
275
+ <span className="text-[12px] text-[white]">
276
+ ¿Cuántos pasajes quieres?
277
+ </span>
278
+ <div
279
+ className="flex w-full items-center justify-between"
280
+ style={{
281
+ border: "1px solid #363c48",
282
+ backgroundColor: "#1a202e",
283
+ padding: "6px 14px",
284
+ borderRadius: "14px",
285
+ }}
286
+ >
287
+ <button
288
+ type="button"
289
+ aria-label="Disminuir pasajes"
290
+ disabled={!canDecreaseTicketQuantity}
291
+ onClick={() => onDecreaseTicketQuantity?.(serviceItem)}
292
+ className={`flex h-[34px] w-[34px] items-center justify-center rounded-full border-none text-[25px] leading-none text-[white] ${
293
+ canDecreaseTicketQuantity
294
+ ? "cursor-pointer bg-[#2d374d]"
295
+ : "cursor-not-allowed bg-[#222b3d] opacity-50"
296
+ }`}
297
+ >
298
+ -
299
+ </button>
300
+ <span className="bold-text text-[20px] text-[white]">
301
+ {ticketQuantity}
302
+ </span>
303
+ <button
304
+ type="button"
305
+ aria-label="Aumentar pasajes"
306
+ onClick={() => onIncreaseTicketQuantity?.(serviceItem)}
307
+ className="flex h-[34px] w-[34px] cursor-pointer items-center justify-center rounded-full border-none bg-[#2d374d] text-[25px] leading-none text-[white]"
308
+ >
309
+ +
310
+ </button>
311
+ </div>
312
+ <button
313
+ type="button"
314
+ onClick={onBookButtonPress}
315
+ className="flex items-center gap-[6px] px-[20px] py-[10px] rounded-[16px] text-[white] bold-text text-[13px] mt-[4px] justify-center border-none cursor-pointer"
316
+ style={{
317
+ backgroundColor: "#FF5C60",
318
+ animation: "pulse-zoom 2s ease-in-out infinite",
319
+ whiteSpace: "nowrap",
320
+ width: "100%",
321
+ }}
322
+ >
323
+ <LottiePlayer
324
+ animationData={serviceItem.icons.thunderAnim}
325
+ width="18px"
326
+ height="18px"
327
+ />
328
+ <span className="whitespace-nowrap">¡Lo quiero!</span>
329
+ </button>
330
+ </div>
331
+ </div>
332
+ <div className="flex justify-between items-center">
333
+ <div className="flex items-center">
334
+ <LottiePlayer
335
+ animationData={serviceItem.icons.dotAnimation}
336
+ width="12px"
337
+ height="12px"
338
+ />
339
+ <span className="ml-[5px]">
340
+ <span className="bold-text text-[white]">
341
+ {" "}
342
+ <span
343
+ className="bold-text"
344
+ ref={(node) =>
345
+ commonService.startViewerCount(node, viewersConfig)
346
+ }
347
+ style={{
348
+ fontVariantNumeric: "tabular-nums",
349
+ }}
350
+ />{" "}
351
+ </span>{" "}
352
+ <span className="text-[white]">viendo |</span>{" "}
353
+ <span
354
+ className="bold-text text-[white]"
355
+ ref={(node) =>
356
+ commonService.startComprandoCount(node, 4, 16)
357
+ }
358
+ style={{ fontVariantNumeric: "tabular-nums" }}
359
+ />{" "}
360
+ <span className="text-[white]">han comprado</span>
361
+ </span>
362
+ </div>
363
+ <div
364
+ className={`transition-transform duration-300 ease-in-out ${isItemExpanded ? "rotate-180" : ""}`}
365
+ onClick={onToggleExpand}
366
+ >
367
+ <img
368
+ src={serviceItem?.icons?.downArrow}
369
+ alt="down arrow"
370
+ style={{
371
+ width: "14px",
372
+ height: "8px",
373
+ filter: "brightness(0) invert(1)",
374
+ }}
375
+ />
376
+ </div>
377
+ </div>
378
+ </div>
379
+ </div>
380
+
381
+ {isItemExpanded && (
382
+ <div
383
+ className="flex flex-col gap-[10px]"
384
+ style={{
385
+ opacity: isItemExpanded ? 1 : 0,
386
+ transition: "opacity 250ms ease-in-out",
387
+ }}
388
+ >
389
+ <div
390
+ className={` text-[12px] ${
391
+ isItemExpanded ? "pt-[14px] pb-[6px]" : "py-0"
392
+ }`}
393
+ style={{ transition: "padding 300ms ease-in-out" }}
394
+ >
395
+ <span className="bold-text">¿Cómo funciona?</span>
396
+
397
+ <div className="flex flex-col">
398
+ {HOW_IT_WORKS_STEPS.map((step) => (
399
+ <div className="flex items-start gap-[8px] mt-[10px]">
400
+ <div>
401
+ <FeatureStepIcon icon={step.icon} />
402
+ </div>
403
+ <div className="flex flex-col">
404
+ <span className="bold-text">{step.name}</span>
405
+ <span>{step.text}</span>
406
+ </div>
407
+ </div>
408
+ // <div
409
+ // key={step.name}
410
+ // className="flex flex-col items-center text-center text-[#272727]"
411
+ // >
412
+ // <FeatureStepIcon icon={step.icon} />
413
+ // <span className="bold-text mt-[10px] text-[12px] leading-[14px]">
414
+ // {step.name}
415
+ // </span>
416
+ // <span className="mt-[2px] max-w-[220px] text-[12px] leading-[14px] text-[#4a4a4a]">
417
+ // {step.text}
418
+ // </span>
419
+ // </div>
420
+ ))}
421
+ </div>
422
+ </div>
423
+ </div>
424
+ )}
425
+ </div>
426
+ {/* <div
427
+ className=""
428
+ style={{
429
+ border: "1px solid #c0c0c0",
430
+ padding: "14px",
431
+ borderRadius: "14px",
432
+ }}
433
+ >
434
+ <div className="flex justify-between items-center px-[14px] pb-[10px] text-[13.33px]">
435
+ <div className="flex items-center gap-[10px]">
436
+ <span>Salida flexible</span>
437
+ <div
438
+ className="bold-text font-[9px]"
439
+ style={{
440
+ backgroundColor: "#FF5C60",
441
+ padding: "1px 8px",
442
+ borderRadius: "4px",
443
+ color: "#fff",
444
+ animation: "pulse-zoom 2s ease-in-out infinite",
445
+ whiteSpace: "nowrap",
446
+ }}
447
+ >
448
+ <span>AHORRAS 60%</span>
449
+ </div>
450
+ </div>
451
+ <div>
452
+ <span>
453
+ {renderIcon("fireIcon", "14px")}{" "}
454
+ <span className="bold-text">Remate</span> términa en{" "}
455
+ <span
456
+ className="bold-text text-end"
457
+ ref={(node) => commonService.startCountdown(node, 599)}
458
+ style={{
459
+ fontVariantNumeric: "tabular-nums",
460
+ display: "inline-block",
461
+ color: "#FF5C60",
462
+ minWidth: "40px",
463
+ }}
464
+ />
465
+ </span>
466
+ </div>
467
+ </div>
468
+ <div
469
+ id={`service-card-${serviceItem.id}`}
470
+ className="bg-[#0C1421] text-white mx-auto relative rounded-[14px] p-[14px] text-[13.33px]"
471
+ >
472
+ <div className="grid grid-cols-[23%_50%_27%] items-stretch">
473
+ <div className="flex flex-col justify-between gap-[20px] my-[14px] pr-[22px]">
474
+ <div className="flex flex-col gap-[8px]">
475
+ <div className="flex items-center gap-[8px]">
476
+ <img
477
+ src={serviceItem.icons?.whiteOrigin}
478
+ alt="origin"
479
+ className={`w-[14px] h-[14px] shrink-0 ${
480
+ isSoldOut ? "grayscale" : ""
481
+ }`}
482
+ />
483
+ <span className="text-[13px] bold-text">
484
+ {cityOrigin?.label.split(",")[0]}
485
+ </span>
486
+ </div>
487
+ <div className="flex items-center gap-[8px]">
488
+ <img
489
+ src={serviceItem.icons?.whiteDestination}
490
+ alt="destination"
491
+ className={`w-[14px] h-[14px] shrink-0 ${
492
+ isSoldOut ? "grayscale" : ""
493
+ }`}
494
+ style={{ opacity: isSoldOut ? 0.5 : 1 }}
495
+ />
496
+ <span className="text-[13px] bold-text">
497
+ {cityDestination?.label.split(",")[0]}
498
+ </span>
499
+ </div>
500
+ </div>
501
+
502
+ <div className="flex flex-col gap-[8px]">
503
+ <div className="text-[12px] bold-text whitespace-nowrap">
504
+ Entre 07:00 AM y 10:00 AM
505
+ </div>
506
+ <div className="text-[11px] bold-text">Viernes 23 de mayo</div>
507
+ </div>
508
+
509
+ <div className="flex flex-col items-start gap-[10px] text-[12px] ">
510
+ <div className="flex items-justify gap-[8px]">
511
+ <AssuranceIcon type="pending" />
512
+
513
+ <span
514
+ className="text-[10px]"
515
+ style={{
516
+ lineHeight: 1.3,
517
+ }}
518
+ >
519
+ Empresa y hora a confirmar luego del pago.
520
+ </span>
521
+ </div>
522
+ <div className="flex items-justify gap-[8px]">
523
+ <AssuranceIcon type="secured" />
524
+
525
+ <span
526
+ className="text-[10px]"
527
+ style={{
528
+ lineHeight: 1.3,
529
+ }}
530
+ >
531
+ Tu compra está 100% asegurada.
532
+ </span>
533
+ </div>
534
+ </div>
535
+ </div>
536
+
537
+ <div className="min-w-0 px-[22px] flex flex-col items-center justify-between gap-[16px] py-[2px] border-r border-[#363c48] border-l border-[#363c48]">
538
+ <div className="text-center">
539
+ <div className="bold-text text-[14px]">
540
+ 3 operadores compitiendo por tu compra
541
+ </div>
542
+ </div>
543
+
544
+ <div className="grid w-full grid-cols-3 items-stretch gap-[14px] mb-[12px]">
545
+ {operators.map((op, idx) => (
546
+ <div
547
+ key={idx}
548
+ className="flex min-w-0 flex-col items-center justify-center gap-[8px] rounded-[8px]"
549
+ style={{
550
+ border: "1px solid #363c48",
551
+ backgroundColor: "#1a202e",
552
+ padding: "14px 10px",
553
+ }}
554
+ >
555
+ <img
556
+ src={serviceItem.operator_details[0]}
557
+ alt={op.name}
558
+ className={`h-[24px] max-w-full object-contain ${
559
+ isSoldOut ? "grayscale" : ""
560
+ }`}
561
+ />
562
+ <span className="text-[11px] truncate max-w-full text-center">
563
+ {serviceItem.operator_details[2]}
564
+ </span>
565
+ <div className="bg-[#FF8F45] text-white text-[12px] font-bold px-[10px] py-[4px] rounded-[4px] bold-text whitespace-nowrap">
566
+ <span>{op?.time}</span>
567
+ </div>
568
+ <span className="text-[10px] mt-[6px]">
569
+ {op?.seatsAvailable}
570
+ </span>
571
+ </div>
572
+ ))}
573
+ </div>
574
+
575
+ <div
576
+ className="flex w-full items-center justify-center gap-[6px] text-[12px]"
577
+ style={{
578
+ border: "1px solid #363c48",
579
+ backgroundColor: "#1a202e",
580
+ padding: "8px 14px",
581
+ borderRadius: "24px",
582
+ }}
583
+ >
584
+ <LottiePlayer
585
+ animationData={serviceItem?.icons?.personsAnim}
586
+ width="18px"
587
+ height="18px"
588
+ />
589
+ <span>
590
+ <span className="bold-text text-white">
591
+ {" "}
592
+ <span
593
+ className="bold-text"
594
+ ref={(node) =>
595
+ commonService.startViewerCount(node, viewersConfig)
596
+ }
597
+ style={{
598
+ fontVariantNumeric: "tabular-nums",
599
+ color: "#FF5C60",
600
+ }}
601
+ />{" "}
602
+ </span>{" "}
603
+ viendo |{" "}
604
+ <span
605
+ className="bold-text"
606
+ ref={(node) =>
607
+ commonService.startComprandoCount(node, 4, 16)
608
+ }
609
+ style={{ fontVariantNumeric: "tabular-nums" }}
610
+ />{" "}
611
+ han comprado
612
+ </span>
613
+ </div>
614
+ </div>
615
+
616
+ <div className="flex flex-col justify-center gap-[12px] py-[2px] pl-[22px] pr-[10px] relative mb-[16px]">
617
+ <div
618
+ className="flex flex-col gap-[6px] "
619
+ style={{
620
+ alignItems: "center",
621
+ }}
622
+ >
623
+ <span
624
+ className="text-[#FF8F45] bold-text text-[26px] leading-tight"
625
+ style={{
626
+ animation: "pulse-zoom 2s ease-in-out infinite",
627
+ whiteSpace: "nowrap",
628
+ }}
629
+ >
630
+ 60% OFF
631
+ </span>
632
+
633
+ <span
634
+ className="text-[13.33px] font-normal leading-[20px] text-[#9f9f9f] relative"
635
+ style={{ position: "relative" }}
636
+ >
637
+ $10.000
638
+ <span
639
+ style={{
640
+ position: "absolute",
641
+ left: "-2px",
642
+ top: "50%",
643
+ width: "calc(100% + 4px)",
644
+ height: "1px",
645
+
646
+ backgroundColor: "#FF5C60",
647
+
648
+ transform: "rotate(-10deg)",
649
+ transformOrigin: "center",
650
+ }}
651
+ />
652
+ </span>
653
+ <span className="text-white bold-text text-[28px] leading-none">
654
+ {`$${(4000 * ticketQuantity).toLocaleString()}`}
655
+ </span>
656
+ </div>
657
+
658
+ <div className="mt-[4px] flex flex-col items-center gap-[8px]">
659
+ <span className="text-[12px] text-white">
660
+ ¿Cuántos pasajes quieres?
661
+ </span>
662
+ <div
663
+ className="flex w-full items-center justify-between"
664
+ style={{
665
+ border: "1px solid #363c48",
666
+ backgroundColor: "#1a202e",
667
+ padding: "6px 14px",
668
+ borderRadius: "14px",
669
+ }}
670
+ >
671
+ <button
672
+ type="button"
673
+ aria-label="Disminuir pasajes"
674
+ disabled={!canDecreaseTicketQuantity}
675
+ onClick={() => onDecreaseTicketQuantity?.(serviceItem)}
676
+ className={`flex h-[34px] w-[34px] items-center justify-center rounded-full border-none text-[25px] leading-none text-white ${
677
+ canDecreaseTicketQuantity
678
+ ? "cursor-pointer bg-[#2d374d]"
679
+ : "cursor-not-allowed bg-[#222b3d] opacity-50"
680
+ }`}
681
+ >
682
+ -
683
+ </button>
684
+ <span className="bold-text text-[20px] text-white">
685
+ {ticketQuantity}
686
+ </span>
687
+ <button
688
+ type="button"
689
+ aria-label="Aumentar pasajes"
690
+ onClick={() => onIncreaseTicketQuantity?.(serviceItem)}
691
+ className="flex h-[34px] w-[34px] cursor-pointer items-center justify-center rounded-full border-none bg-[#2d374d] text-[25px] leading-none text-white"
692
+ >
693
+ +
694
+ </button>
695
+ </div>
696
+ </div>
697
+
698
+ <button
699
+ type="button"
700
+ onClick={onBookButtonPress}
701
+ className="flex items-center gap-[6px] px-[20px] py-[10px] rounded-[16px] text-white bold-text text-[13px] mt-[4px] justify-center border-none cursor-pointer"
702
+ style={{
703
+ backgroundColor: "#FF5C60",
704
+ animation: "pulse-zoom 2s ease-in-out infinite",
705
+ whiteSpace: "nowrap",
706
+ }}
707
+ >
708
+ <LottiePlayer
709
+ animationData={serviceItem?.icons?.thunderAnim}
710
+ width="18px"
711
+ height="18px"
712
+ />
713
+ <span className="whitespace-nowrap">¡Lo quiero!</span>
714
+ </button>
715
+ </div>
716
+
717
+ <div
718
+ className={`absolute bottom-[11px] right-[18px] cursor-pointer transition-transform duration-300 ease-in-out ${isItemExpanded ? "rotate-180" : ""}`}
719
+ onClick={onToggleExpand}
720
+ >
721
+ <img
722
+ src={serviceItem.icons?.downArrow}
723
+ alt="down arrow"
724
+ style={{
725
+ width: "14px",
726
+ height: "8px",
727
+ filter: "brightness(0) invert(1)",
728
+ }}
729
+ />
730
+ </div>
731
+ </div>
732
+ </div>
733
+ <div
734
+ className="grid"
735
+ style={{
736
+ gridTemplateRows: isItemExpanded ? "1fr" : "0fr",
737
+ opacity: isItemExpanded ? 1 : 0,
738
+ transition:
739
+ "grid-template-rows 300ms ease-in-out, opacity 250ms ease-in-out",
740
+ }}
741
+ >
742
+ <div
743
+ className={`min-h-0 overflow-hidden px-[16px] text-[13.33px] ${
744
+ isItemExpanded ? "pt-[14px] pb-[6px]" : "py-0"
745
+ }`}
746
+ style={{ transition: "padding 300ms ease-in-out" }}
747
+ >
748
+ <span className="bold-text">¿Cómo funciona?</span>
749
+
750
+ <div className="mt-[14px] grid grid-cols-4 gap-[20px] px-[16px] ">
751
+ {HOW_IT_WORKS_STEPS.map((step) => (
752
+ <div
753
+ key={step.name}
754
+ className="flex flex-col items-center text-center text-[#272727]"
755
+ >
756
+ <FeatureStepIcon icon={step.icon} />
757
+ <span className="bold-text mt-[10px] text-[12px] leading-[14px]">
758
+ {step.name}
759
+ </span>
760
+ <span className="mt-[2px] max-w-[220px] text-[12px] leading-[14px] text-[#4a4a4a]">
761
+ {step.text}
762
+ </span>
763
+ </div>
764
+ ))}
765
+ </div>
766
+ </div>
767
+ </div>
768
+ </div> */}
769
+
770
+ {/* TOP BADGE — "Remate | Termina en 09:55 min" hardcoded, no countdown hook */}
771
+ {/* {showTopLabel && (
772
+ <div className="absolute -top-[11px] left-0 w-full flex items-center justify-end gap-[12px] pr-[15px] z-10 ">
773
+ <div className="flex items-center gap-[6px] py-[5px] px-[14px] rounded-[38px] text-[12.5px] bg-[#FF8F45] text-white whitespace-nowrap">
774
+ <LottiePlayer
775
+ animationData={getAnimationIcon("bombAnimation")}
776
+ width="14px"
777
+ height="14px"
778
+ />
779
+ <span>
780
+ <strong>Remate</strong> | Termina en{" "}
781
+ <strong>{HARDCODED_COUNTDOWN}</strong> min
782
+ </span>
783
+ </div>
784
+ </div>
785
+ )} */}
786
+ </div>
787
+ );
788
+ };
789
+
790
+ export default FeatureServiceUiMobile;