kupos-ui-components-lib 9.0.11 → 9.1.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.
@@ -1 +1 @@
1
- {"nm":"Main Scene","ddd":0,"h":100,"w":100,"meta":{"g":"@lottiefiles/creator 1.86.1"},"layers":[{"ty":4,"nm":"Shape Layer 1","sr":1,"st":0,"op":150,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[71.60193719360672,49.48916172143199]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[90,90],"t":4},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":31},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[90,90],"t":63},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[100,100],"t":97},{"s":[90,90],"t":133}]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[71.60193719360672,49.48916172143199]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"gr","bm":0,"hd":false,"nm":"Group 1","np":5,"it":[{"ty":"sh","bm":0,"hd":false,"nm":"Path 1","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[24.18,0],[0,-24.18],[-24.18,0],[0,24.18]],"o":[[0,-24.18],[-24.18,0],[0,24.18],[24.18,0],[0,0]],"v":[[93.78,50],[50,6.22],[6.22,50],[50,93.78],[93.78,50]]}}},{"ty":"sh","bm":0,"hd":false,"nm":"Path 2","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[11.23,0],[0,-11.23],[-11.23,0],[0,11.23]],"o":[[0,-11.23],[-11.23,0],[0,11.23],[11.23,0],[0,0]],"v":[[70.34,50],[50,29.66],[29.66,50],[50,70.34],[70.34,50]]}}},{"ty":"sh","bm":0,"hd":false,"nm":"Path 3","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[14.66,0],[0,14.66],[-14.66,0],[0,-14.66]],"o":[[0,14.66],[-14.66,0],[0,-14.66],[14.66,0],[0,0]],"v":[[76.55,50],[50,76.55],[23.45,50],[50,23.45],[76.55,50]]}}},{"ty":"sh","bm":0,"hd":false,"nm":"Path 4","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[27.61,0],[0,27.61],[-27.61,0],[0,-27.61]],"o":[[0,27.61],[-27.61,0],[0,-27.61],[27.61,0],[0,0]],"v":[[100,50],[50,100],[0,50],[50,0],[100,50]]}}},{"ty":"fl","bm":0,"hd":false,"nm":"Fill","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[71.60193719360672,49.48916172143199]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[71.60193719360672,49.48916172143199]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]}],"ind":1}],"v":"5.7.0","fr":30,"op":150,"ip":0,"assets":[]}
1
+ {"nm":"Main Scene","ddd":0,"h":500,"w":500,"meta":{"g":"@lottiefiles/creator 1.25.0"},"layers":[{"ty":0,"nm":" Main Scene","sr":1,"st":0,"op":90,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[250,250]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[250,250]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"w":500,"h":500,"refId":"precomp_Main Scene_c6717324-fe11-4912-8421-1a94a5c0a552","ind":1}],"v":"5.7.0","fr":30,"op":90,"ip":0,"assets":[{"nm":"Main Scene","id":"precomp_Main Scene_c6717324-fe11-4912-8421-1a94a5c0a552","layers":[{"ty":4,"nm":"Shape Layer - SVG","sr":1,"st":0,"op":90,"ip":0,"hd":false,"ln":"Capa_1","ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[32.5,32.5]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0,0],"t":4},{"s":[619.0851,619.0851],"t":14}]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[249.94198808735723,248.20464459007883]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"s":[100],"t":7}]}},"shapes":[{"ty":"gr","bm":0,"hd":false,"nm":"Group 1","it":[{"ty":"sh","bm":0,"hd":false,"nm":"Path 1","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[1.0100000000000051,0.14999999999999858],[0,0],[0,0],[1.0400000000000063,0],[0.46000000000000085,-0.9199999999999999],[0,0],[0,0],[0.3200000000000003,-0.9899999999999984],[-0.75,-0.740000000000002],[0,0],[0,0],[-0.8599999999999994,-0.6299999999999955],[-0.9000000000000004,0.480000000000004],[0,0],[0,0],[-0.4299999999999997,0],[-0.47000000000000597,0.3400000000000034],[0.14999999999999858,1.0300000000000011],[0,0],[0,0],[0.3299999999999983,0.990000000000002],[0,0]],"o":[[-0.3200000000000003,-0.9899999999999984],[0,0],[0,0],[-0.46999999999999886,-0.96],[-1.0400000000000063,0],[0,0],[0,0],[-1.0099999999999998,0.14999999999999858],[-0.32000000000000006,0.9899999999999984],[0,0],[0,0],[-0.17999999999999972,1.0300000000000011],[0.8300000000000001,0.6300000000000026],[0,0],[0,0],[0.3999999999999986,0.21999999999999886],[0.5399999999999991,0],[0.8299999999999983,-0.6300000000000026],[0,0],[0,0],[0.7199999999999989,-0.7399999999999984],[0,0],[0,0]],"v":[[62.9,25.51],[60.739999999999995,23.67],[42.89999999999999,21.020000000000003],[34.93999999999999,4.510000000000002],[32.52999999999999,3.0000000000000018],[30.119999999999987,4.510000000000002],[22.149999999999988,21.020000000000003],[4.309999999999988,23.67],[2.149999999999988,25.51],[2.829999999999988,28.310000000000002],[15.729999999999988,41.17],[12.669999999999987,59.34],[13.749999999999988,62.03],[16.559999999999988,62.25],[32.48999999999999,53.66],[48.41999999999999,62.25],[49.679999999999986,62.58],[51.26999999999999,62.059999999999995],[52.34999999999999,59.37],[49.289999999999985,41.199999999999996],[62.18999999999998,28.339999999999996],[62.86999999999998,25.539999999999996],[62.90999999999998,25.499999999999996]]}}},{"ty":"st","bm":0,"hd":false,"nm":"Stroke","lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100},"w":{"a":0,"k":3.58},"c":{"a":0,"k":[0.9765,0.5373,0.2706]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]}],"ind":1}]}]}
@@ -268,6 +268,35 @@ function ServiceItemPB({
268
268
 
269
269
  const countdownSeconds = 7830;
270
270
 
271
+ const startCountdown = (node: HTMLSpanElement | null) => {
272
+ if (!node) return;
273
+
274
+ const prevId = node.dataset.countdownId;
275
+ if (prevId) clearInterval(Number(prevId));
276
+
277
+ let remaining = countdownSeconds;
278
+
279
+ const formatTime = (totalSecs: number) => {
280
+ const h = Math.floor(totalSecs / 3600);
281
+ const m = Math.floor((totalSecs % 3600) / 60);
282
+ const s = totalSecs % 60;
283
+ return `${String(h).padStart(2, "0")}:${String(m).padStart(2, "0")}:${String(s).padStart(2, "0")}`;
284
+ };
285
+
286
+ node.textContent = formatTime(remaining);
287
+
288
+ const id = setInterval(() => {
289
+ remaining -= 1;
290
+ if (remaining <= 0) {
291
+ remaining = 0;
292
+ clearInterval(id);
293
+ }
294
+ node.textContent = formatTime(remaining);
295
+ }, 1000);
296
+
297
+ node.dataset.countdownId = String(id);
298
+ };
299
+
271
300
  const items = [
272
301
  {
273
302
  key: "amenities",
@@ -304,7 +333,7 @@ function ServiceItemPB({
304
333
  {
305
334
  key: "directo",
306
335
  width: "12%",
307
- condition: serviceItem?.is_direct_trip,
336
+ condition: serviceItem?.is_direct_trip === true,
308
337
  render: (
309
338
  <DirectoBlock
310
339
  translation={translation}
@@ -334,7 +363,7 @@ function ServiceItemPB({
334
363
  {
335
364
  key: "flexible",
336
365
  width: "20%",
337
- condition: serviceItem.is_change_ticket,
366
+ condition: serviceItem.is_change_ticket === true,
338
367
  render: (
339
368
  <FlexibleBlock
340
369
  translation={translation}
@@ -383,11 +412,21 @@ function ServiceItemPB({
383
412
  />
384
413
  ) : (
385
414
  <div
415
+ // className={`relative ${
416
+ // serviceItem.offer_text ? "mb-[55px]" : "mb-[10px]"
417
+ // } mt-[14px]`}
418
+
386
419
  className={`relative ${
387
420
  serviceItem.offer_text ? "mb-[55px]" : "mb-[10px]"
388
- } mt-[14px]`}
421
+ } ${
422
+ serviceItem?.is_direct_trip ||
423
+ serviceItem?.train_type_label === "Tren Express (Nuevo)" ||
424
+ showTopLabel
425
+ ? "mt-[24px]"
426
+ : "mt-[20px]"
427
+ } `}
389
428
  >
390
- <TopAmenities
429
+ {/* <TopAmenities
391
430
  showPromo={showPromo}
392
431
  showTopLabel={showTopLabel}
393
432
  isSoldOut={isSoldOut}
@@ -406,21 +445,22 @@ function ServiceItemPB({
406
445
  cardEl.style.borderRadius = "10px";
407
446
  }
408
447
  }}
409
- />
448
+ offerText={serviceItem?.offer_text}
449
+ /> */}
410
450
  <div
411
451
  id={`service-card-${serviceItem.id}`}
412
- className="bg-white mx-auto relative "
413
- style={{
414
- border:
415
- countdownSeconds > 0
416
- ? `1px solid ${colors.priceColor}`
417
- : "1px solid #ccc",
418
- borderRadius: showTopLabel
419
- ? "10px 0 10px 10px"
420
- : countdownSeconds > 0
421
- ? "10px 0 10px 10px"
422
- : "10px",
423
- }}
452
+ className="bg-white mx-auto relative rounded-[10px] border border-[#ccc]"
453
+ // style={{
454
+ // border:
455
+ // countdownSeconds > 0 && serviceItem?.offer_text
456
+ // ? `1px solid ${colors.priceColor}`
457
+ // : "1px solid #ccc",
458
+ // borderRadius: showTopLabel
459
+ // ? "10px 0 10px 10px"
460
+ // : countdownSeconds > 0 && serviceItem?.offer_text
461
+ // ? "10px 0 10px 10px"
462
+ // : "10px",
463
+ // }}
424
464
  >
425
465
  <div
426
466
  // className="p-[15px] pt-[20px]"
@@ -585,14 +625,127 @@ function ServiceItemPB({
585
625
  opacity: isSoldOut ? 0.5 : 1,
586
626
  }}
587
627
  >
588
- <LottiePlayer
589
- animationData={getAnimationIcon("promoAnim")}
628
+ <div className="flex justify-between items-center w-full">
629
+ <div className="flex items-center">
630
+ <LottiePlayer
631
+ animationData={getAnimationIcon("bombAnimation")}
632
+ width="18px"
633
+ height="18px"
634
+ />
635
+ <span className="bold-text ml-[8px]">
636
+ {" "}
637
+ {serviceItem?.offer_text || ""}
638
+ </span>
639
+ </div>
640
+ <div>
641
+ Termina en&nbsp;
642
+ <span
643
+ className="bold-text text-end"
644
+ ref={startCountdown}
645
+ style={{
646
+ fontVariantNumeric: "tabular-nums",
647
+ display: "inline-block",
648
+ // minWidth: "70px",
649
+ }}
650
+ />
651
+ </div>
652
+ </div>
653
+ {/* <LottiePlayer
654
+ animationData={getAnimationIcon("bombAnimation")}
590
655
  width="18px"
591
656
  height="18px"
592
657
  />
593
- <span className="ml-[10px]">{serviceItem?.offer_text}</span>
658
+ <span className="bold-text ml-[8px]">
659
+ {serviceItem?.offer_text || ""}&nbsp;
660
+ </span>{" "}
661
+ | Termina en&nbsp;
662
+ <span
663
+ className="bold-text text-end"
664
+ ref={startCountdown}
665
+ style={{
666
+ fontVariantNumeric: "tabular-nums",
667
+ display: "inline-block",
668
+ minWidth: "70px",
669
+ }}
670
+ /> */}
594
671
  </div>
595
672
  )}
673
+ <div className="absolute -top-[11px] left-0 w-full flex items-center justify-end gap-[12px] pr-[15px] z-10 ">
674
+ {showTopLabel && (
675
+ <div
676
+ className={`flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-10`}
677
+ style={{
678
+ backgroundColor: isSoldOut
679
+ ? "#ddd"
680
+ : colors.ratingBottomColor,
681
+ }}
682
+ >
683
+ <div className={isSoldOut ? "grayscale" : ""}>
684
+ <LottiePlayer
685
+ // animationData={serviceItem.icons.priorityStageAnim}
686
+ animationData={getAnimationIcon("priorityStageAnim")}
687
+ width="14px"
688
+ height="14px"
689
+ />
690
+ </div>
691
+ <div
692
+ className={
693
+ isSoldOut ? "text-white" : `text-[${colors.topLabelColor}]`
694
+ }
695
+ >
696
+ {showTopLabel}
697
+ </div>
698
+ </div>
699
+ )}
700
+ {serviceItem?.is_transpordo && (
701
+ <div
702
+ className={`flex items-center gap-[10px] py-[4px] text-white px-[14px] rounded-[38px] text-[12.5px] z-20`}
703
+ style={{
704
+ backgroundColor: isSoldOut ? "#ddd" : colors.tooltipColor,
705
+ }}
706
+ >
707
+ <LottiePlayer
708
+ animationData={serviceItem.icons.connectingServiceIcon}
709
+ // animationData={getAnimationIcon(connectingServiceIcon)}
710
+ width="14px"
711
+ height="14px"
712
+ />
713
+ <div>{"Conexión"}</div>
714
+ </div>
715
+ )}
716
+ {/* {serviceItem?.is_direct_trip && (
717
+ <div
718
+ className={`flex items-center gap-[10px] py-[4px] text-white px-[14px] rounded-[38px] text-[12.5px] z-20 `}
719
+ style={{
720
+ backgroundColor: isSoldOut ? "#ddd" : colors.tooltipColor,
721
+ }}
722
+ >
723
+ <LottiePlayer
724
+ // animationData={serviceItem.icons.directoAnim}
725
+ animationData={getAnimationIcon("directoAnim")}
726
+ width="14px"
727
+ height="14px"
728
+ />
729
+ <div>{translation?.directService}</div>
730
+ </div>
731
+ )} */}
732
+ {serviceItem?.train_type_label === "Tren Express (Nuevo)" && (
733
+ <div
734
+ className={`flex items-center gap-[10px] py-[4px] text-white px-[14px] rounded-[38px] text-[12.5px] z-20 `}
735
+ style={{
736
+ backgroundColor: isSoldOut ? "#ddd" : colors.tooltipColor,
737
+ }}
738
+ >
739
+ <LottiePlayer
740
+ // animationData={serviceItem.icons.directoAnim}
741
+ animationData={getAnimationIcon("directoAnim")}
742
+ width="14px"
743
+ height="14px"
744
+ />
745
+ <div>{"Tren Express"}</div>
746
+ </div>
747
+ )}
748
+ </div>
596
749
  </div>
597
750
  )}
598
751
  </>
@@ -51,6 +51,35 @@ function ServiceItemMobile({
51
51
 
52
52
  const countdownSeconds = 7830;
53
53
 
54
+ const startCountdown = (node: HTMLSpanElement | null) => {
55
+ if (!node) return;
56
+
57
+ const prevId = node.dataset.countdownId;
58
+ if (prevId) clearInterval(Number(prevId));
59
+
60
+ let remaining = countdownSeconds;
61
+
62
+ const formatTime = (totalSecs: number) => {
63
+ const h = Math.floor(totalSecs / 3600);
64
+ const m = Math.floor((totalSecs % 3600) / 60);
65
+ const s = totalSecs % 60;
66
+ return `${String(h).padStart(2, "0")}:${String(m).padStart(2, "0")}:${String(s).padStart(2, "0")}`;
67
+ };
68
+
69
+ node.textContent = formatTime(remaining);
70
+
71
+ const id = setInterval(() => {
72
+ remaining -= 1;
73
+ if (remaining <= 0) {
74
+ remaining = 0;
75
+ clearInterval(id);
76
+ }
77
+ node.textContent = formatTime(remaining);
78
+ }, 1000);
79
+
80
+ node.dataset.countdownId = String(id);
81
+ };
82
+
54
83
  const labelId =
55
84
  typeof serviceItem.boarding_stages === "string"
56
85
  ? serviceItem.boarding_stages.split("|")[0]
@@ -130,12 +159,12 @@ function ServiceItemMobile({
130
159
  isConexion ||
131
160
  serviceItem?.train_type_label === "Tren Express (Nuevo)" ||
132
161
  showTopLabel
133
- ? "mt-[10px]"
162
+ ? "mt-[20px]"
134
163
  : "mt-[10px]"
135
164
  } `}
136
165
  style={{ backgroundColor: "#fff", zIndex: 1 }}
137
166
  >
138
- <TopAmenitieMobile
167
+ {/* <TopAmenitieMobile
139
168
  showTopLabel={showTopLabel}
140
169
  isSoldOut={isSoldOut}
141
170
  seatPriceColor={colors.seatPriceColor}
@@ -152,28 +181,19 @@ function ServiceItemMobile({
152
181
  cardEl.style.borderRadius = "10px";
153
182
  }
154
183
  }}
155
- />
184
+ offerText={serviceItem?.offer_text}
185
+ /> */}
156
186
  <div
157
187
  className={" rounded-[20px]"}
158
188
  style={{
159
189
  backgroundColor: "#fff",
160
190
  zIndex: 1,
161
191
  // borderRadius: showTopLabel ? "10px 0 10px 10px" : "10px",
162
- borderRadius: "12px 0 12px 12px",
163
- border: `1px solid ${colors.bottomStripColor}`,
192
+ borderRadius: "12px",
193
+ border: "1px solid #ccc",
164
194
  }}
165
195
  >
166
- <div
167
- // className={` ${
168
- // serviceItem?.train_type_label === "Tren Express (Nuevo)" ||
169
- // showTopLabel ||
170
- // serviceItem?.is_direct_trip ||
171
- // serviceItem?.is_transpordo
172
- // ? "mt-[10px]"
173
- // : ""
174
- // }`}
175
- style={{ padding: "12px 12px 8px 12px" }}
176
- >
196
+ <div style={{ padding: "12px 12px 8px 12px" }}>
177
197
  {/* Header with operator info and favorite */}
178
198
  <div className="flex justify-between items-center mb-[10px]">
179
199
  <div className="flex items-center justify-between">
@@ -210,7 +230,7 @@ function ServiceItemMobile({
210
230
  className="flex items-center cursor-pointer "
211
231
  style={{ color: isSoldOut ? "#bbb" : "text-[#464647]" }}
212
232
  >
213
- <span className="ml-[3px] min-[420]:text-[13px] text-[12px]">
233
+ <span className="ml-[3px] min-[420]:text-[13px] text-[12px] text-ellipsis">
214
234
  {serviceItem.operator_details[2]}
215
235
  </span>
216
236
  </div>
@@ -228,22 +248,6 @@ function ServiceItemMobile({
228
248
  )}
229
249
  </div>
230
250
  ) : null}
231
- {/* {showLastSeats ? (
232
- <div className="flex justify-end -mt-[5px] -mb-[5px] items-center pt-[5px] pb-[5px] text-center ">
233
- {serviceItem?.available_seats < 10 &&
234
- serviceItem?.available_seats > 0 && (
235
- <span
236
- className="text-[12px] text-[red] mt-1 flex justify-end pt-[5px] pb-[5px] pl-[15px] pr-[15px] rounded-[8px] "
237
- style={{
238
- backgroundColor: colors.lastSeatBg,
239
- color: colors.lastSeatText,
240
- }}
241
- >
242
- ¡ Últimos Asientos!
243
- </span>
244
- )}
245
- </div>
246
- ) : null} */}
247
251
  </div>
248
252
 
249
253
  <DateTimeSectionMobile
@@ -313,21 +317,57 @@ function ServiceItemMobile({
313
317
  opacity: isSoldOut ? 0.5 : 1,
314
318
  }}
315
319
  >
316
- <LottiePlayer
320
+ <div className="flex justify-between items-center w-full">
321
+ <div className="flex items-center">
322
+ <LottiePlayer
323
+ animationData={serviceItem.icons.bombAnim}
324
+ width="18px"
325
+ height="18px"
326
+ />
327
+ <span className="bold-text ml-[8px]">
328
+ {" "}
329
+ {serviceItem?.offer_text || ""}
330
+ </span>
331
+ </div>
332
+ <div>
333
+ Termina en&nbsp;
334
+ <span
335
+ className="bold-text text-end"
336
+ ref={startCountdown}
337
+ style={{
338
+ fontVariantNumeric: "tabular-nums",
339
+ display: "inline-block",
340
+ // minWidth: "70px",
341
+ }}
342
+ />
343
+ </div>
344
+ </div>
345
+ {/* <LottiePlayer
317
346
  animationData={serviceItem.icons.promoAnim}
318
347
  width="18px"
319
348
  height="18px"
320
349
  />
350
+
321
351
  <span className="ml-[10px] text-[#fff] min-[380px]:text-[11px] text-[10px]">
322
- {serviceItem?.offer_text}
323
- </span>
352
+ {serviceItem?.offer_text || ""}&nbsp;
353
+ </span>{" "}
354
+ | Termina en&nbsp;
355
+ <span
356
+ className="bold-text"
357
+ ref={startCountdown}
358
+ style={{
359
+ fontVariantNumeric: "tabular-nums",
360
+ display: "inline-block",
361
+ minWidth: "70px",
362
+ }}
363
+ /> */}
324
364
  </div>
325
365
  )}
326
366
 
327
- <div className="absolute -top-[14px] left-0 w-full flex items-center justify-end gap-[12px] pr-[20px] z-10 ">
328
- {/* {showTopLabel && (
367
+ <div className="absolute -top-[14px] left-0 w-full flex items-center justify-end gap-[12px] pr-[13px] z-10 ">
368
+ {showTopLabel && (
329
369
  <div
330
- className={`flex items-center gap-[2px] py-[5px] px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] z-20 `}
370
+ className={`flex items-center gap-[2px] py-[4px] px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] z-20 `}
331
371
  style={{
332
372
  backgroundColor: isSoldOut ? "#ccc" : colors.ratingBottomColor,
333
373
  }}
@@ -348,7 +388,6 @@ function ServiceItemMobile({
348
388
  </div>
349
389
  </div>
350
390
  )}
351
-
352
391
  {isConexion && (
353
392
  <div
354
393
  className={`flex items-center gap-[2px] py-[5px] text-white px-[10px] rounded-[38px] min-[420]:text-[12px] text-[11px] z-20 ${
@@ -363,22 +402,7 @@ function ServiceItemMobile({
363
402
  <div>Conexión</div>
364
403
  </div>
365
404
  )}
366
- {serviceItem?.is_direct_trip && (
367
- <div
368
- className={`flex items-center gap-[2px] py-[5px] text-white px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] z-20 `}
369
- style={{
370
- backgroundColor: isSoldOut ? "#ddd" : colors.tooltipBgColor,
371
- color: isSoldOut ? "#bbb" : colors.directoColor,
372
- }}
373
- >
374
- <LottiePlayer
375
- animationData={serviceItem.icons.directoAnim}
376
- width="16px"
377
- height="16px"
378
- />
379
- <div className="ml-[5px]">Directo</div>
380
- </div>
381
- )}
405
+
382
406
  {serviceItem?.train_type_label === "Tren Express (Nuevo)" && (
383
407
  <div
384
408
  className={`flex items-center gap-[2px] py-[5px] text-white px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] z-20 `}
@@ -393,7 +417,7 @@ function ServiceItemMobile({
393
417
  />
394
418
  <div>{"Tren Express"}</div>
395
419
  </div>
396
- )} */}
420
+ )}
397
421
  </div>
398
422
  </div>
399
423
 
@@ -81,7 +81,7 @@ const AmenitiesBlock = ({
81
81
  const grayscaleClass = isSoldOut ? "grayscale" : "";
82
82
 
83
83
  return (
84
- <div className="flex items-center gap-[6px]">
84
+ <div className="relative flex items-center gap-[6px] group cursor-pointer">
85
85
  {/* AMENITIES */}
86
86
  {visibleAmenities.map((val, key) => {
87
87
  const raw = metaData.amenities[val];
@@ -89,49 +89,49 @@ const AmenitiesBlock = ({
89
89
  const baseName = getAmenityBaseName(raw);
90
90
 
91
91
  return (
92
- <div key={key} className="relative group cursor-pointer">
92
+ <div key={key}>
93
93
  <div className={grayscaleClass}>
94
94
  <SvgAmenities
95
95
  moreAnemities={false}
96
96
  name={baseName.toLowerCase()}
97
97
  />
98
98
  </div>
99
-
100
- {/* Tooltip – show ALL amenities */}
101
- <div
102
- className={TOOLTIP_CLASS}
103
- style={{
104
- backgroundColor: colors.tooltipColor,
105
- zIndex: 21,
106
- padding: "12px",
107
- }}
108
- >
109
- <TooltipArrow color={colors.tooltipColor} />
110
- <div className="flex flex-col gap-[10px]">
111
- {amenities.map((id, i) => {
112
- const rawItem = metaData.amenities[id];
113
- if (isWater(rawItem)) return null;
114
- const name = getAmenityBaseName(rawItem);
115
- return (
116
- <div
117
- key={i}
118
- className="flex items-center gap-[5px] text-xs whitespace-nowrap"
119
- >
120
- <SvgAmenities
121
- moreAnemities={true}
122
- name={name.toUpperCase()}
123
- color="white"
124
- />
125
- {getAmenityName(name.split("_").join(" "))}
126
- </div>
127
- );
128
- })}
129
- </div>
130
- </div>
131
99
  </div>
132
100
  );
133
101
  })}
134
102
 
103
+ {/* Tooltip – show ALL amenities on container hover */}
104
+ <div
105
+ className={TOOLTIP_CLASS}
106
+ style={{
107
+ backgroundColor: colors.bottomStripColor,
108
+ zIndex: 21,
109
+ padding: "12px",
110
+ }}
111
+ >
112
+ <TooltipArrow color={colors.tooltipColor} />
113
+ <div className="flex flex-col gap-[10px]">
114
+ {amenities.map((id, i) => {
115
+ const rawItem = metaData.amenities[id];
116
+ if (isWater(rawItem)) return null;
117
+ const name = getAmenityBaseName(rawItem);
118
+ return (
119
+ <div
120
+ key={i}
121
+ className="flex items-center gap-[5px] text-xs whitespace-nowrap"
122
+ >
123
+ <SvgAmenities
124
+ moreAnemities={true}
125
+ name={name.toUpperCase()}
126
+ color="white"
127
+ />
128
+ {getAmenityName(name.split("_").join(" "))}
129
+ </div>
130
+ );
131
+ })}
132
+ </div>
133
+ </div>
134
+
135
135
  {/* PLUS ICON */}
136
136
  {/* {shouldShowPlus && (
137
137
  <div className="relative ml-1 cursor-pointer">
@@ -38,6 +38,7 @@ function BottomAmenities({
38
38
  downArrowIcon,
39
39
  onToggleExpand,
40
40
  }: BottomAmenitiesProps): React.ReactElement {
41
+ console.log("🚀 ~ BottomAmenities ~ isItemExpanded:", isItemExpanded);
41
42
  const hasPetInfo =
42
43
  serviceItem.pet_seat_info &&
43
44
  Object.keys(serviceItem.pet_seat_info).length > 0;
@@ -96,7 +97,7 @@ function BottomAmenities({
96
97
  {/* DOWN ARROW ICON */}
97
98
  {/* {showDownArrow ? ( */}
98
99
  <div
99
- className={`flex items-center cursor-pointer ml-[4px] transition-transform duration-300 w-[14px] h-[14px] `}
100
+ className={`flex items-center cursor-pointer ml-[4px] transition-transform duration-300 w-[14px] h-[14px] ${isItemExpanded ? "rotate-180" : ""}`}
100
101
  onClick={onToggleExpand}
101
102
  >
102
103
  {downArrowIcon}
@@ -192,10 +192,10 @@ function DateTimeSection({
192
192
  >
193
193
  <div className="font-[900] bold-text">
194
194
  {removeArrivalTime
195
- ? null
195
+ ? "\u00A0"
196
196
  : serviceItem.arr_time
197
197
  ? DateService.formatTime(serviceItem.arr_time)
198
- : null}
198
+ : "\u00A0"}
199
199
  </div>
200
200
  </StageTooltip>
201
201
  )}
@@ -15,12 +15,12 @@ const DirectoBlock = ({ translation, isSoldOut, colors, getAnimationIcon }) => (
15
15
  {translation?.directService}
16
16
  <div
17
17
  className="hidden group-hover:block absolute top-[24px] left-1/2 -translate-x-1/2 text-white p-3 rounded-[14px] whitespace-nowrap w-fit z-10 mt-2.5 text-center shadow-service text-[12px]"
18
- style={{ backgroundColor: colors.tooltipColor }}
18
+ style={{ backgroundColor: colors.bottomStripColor }}
19
19
  >
20
20
  {/* Tooltip arrow */}
21
21
  <div
22
22
  className="tooltip-arrow absolute -top-[7px] left-1/2 -translate-x-1/2 w-0 h-0 border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent"
23
- style={{ borderBottomColor: colors.tooltipColor }}
23
+ style={{ borderBottomColor: colors.bottomStripColor }}
24
24
  ></div>
25
25
  {translation?.directServiceText}
26
26
  </div>
@@ -16,12 +16,12 @@ const DurationBlock = ({
16
16
  {serviceItem.duration} {translation.hours}
17
17
  <div
18
18
  className="hidden group-hover:block absolute top-[24px] left-1/2 -translate-x-1/2 text-white p-3 rounded-[14px] whitespace-normal z-10 mt-2.5 w-[188px] text-center break-normal shadow-service text-[12px]"
19
- style={{ backgroundColor: colors.tooltipColor }}
19
+ style={{ backgroundColor: colors.bottomStripColor }}
20
20
  >
21
21
  {/* Tooltip arrow */}
22
22
  <div
23
23
  className="tooltip-arrow absolute -top-[7px] left-1/2 -translate-x-1/2 w-0 h-0 border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent"
24
- style={{ borderBottomColor: colors.tooltipColor }}
24
+ style={{ borderBottomColor: colors.bottomStripColor }}
25
25
  ></div>
26
26
  Duración estimada del viaje
27
27
  </div>
@@ -26,14 +26,15 @@ const FlexibleBlock = ({
26
26
  <div
27
27
  className="hidden group-hover:block absolute top-[24px] left-1/2 -translate-x-1/2 text-white p-3 rounded-[14px] whitespace-normal z-10 mt-2.5 w-[230px] text-center break-normal shadow-service text-[12px]"
28
28
  style={{
29
- backgroundColor: colors.tooltipColor,
29
+ backgroundColor: colors.bottomStripColor,
30
30
  lineHeight: "1.5",
31
+ zIndex: "1000",
31
32
  }}
32
33
  >
33
34
  {/* Tooltip arrow */}
34
35
  <div
35
36
  className="tooltip-arrow absolute -top-[7px] left-1/2 -translate-x-1/2 w-0 h-0 border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent "
36
- style={{ borderBottomColor: colors.tooltipColor }}
37
+ style={{ borderBottomColor: colors.bottomStripColor }}
37
38
  ></div>
38
39
  Esta empresa permite cambios sin costo hasta (
39
40
  {serviceItem?.change_ticket_hours ?? 6}) horas antes del viaje.