kupos-ui-components-lib 9.3.1 → 9.3.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.
- package/dist/assets/images/anims/service_list/dot_animation.json +1 -0
- package/dist/assets/images/anims/service_list/thunder_icon.json +1 -0
- package/dist/components/ServiceItem/ServiceItemDesktop.js +57 -62
- package/dist/components/ServiceItem/ServiceItemMobile.js +45 -36
- package/dist/components/ServiceItem/mobileTypes.d.ts +3 -0
- package/dist/styles.css +88 -23
- package/dist/types.d.ts +2 -0
- package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +16 -19
- package/dist/ui/FeatureServiceUI/FeatureServiceUi.d.ts +12 -0
- package/dist/ui/FeatureServiceUI/FeatureServiceUi.js +101 -0
- package/dist/ui/SeatSection/SeatSection.d.ts +2 -1
- package/dist/ui/SeatSection/SeatSection.js +26 -10
- package/dist/ui/mobileweb/ExpandedDropdownMobile.js +18 -18
- package/dist/ui/mobileweb/SeatSectionMobile.js +24 -16
- package/package.json +1 -1
- package/src/assets/images/anims/service_list/dot_animation.json +1 -0
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +83 -129
- package/src/components/ServiceItem/ServiceItemMobile.tsx +115 -55
- package/src/components/ServiceItem/mobileTypes.ts +3 -0
- package/src/types.ts +2 -0
- package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +26 -67
- package/src/ui/SeatSection/SeatSection.tsx +65 -32
- package/src/ui/mobileweb/ExpandedDropdownMobile.tsx +24 -24
- package/src/ui/mobileweb/SeatSectionMobile.tsx +68 -32
|
@@ -24,6 +24,7 @@ import opsitesLocationAnimation from "../../assets/images/anims/service_list/ops
|
|
|
24
24
|
import opsitesPriorityStageAnimation from "../../assets/images/anims/service_list/opsitesPriorityStage.json";
|
|
25
25
|
|
|
26
26
|
import bombAnimation from "../../assets/images/anims/service_list/bomb.json";
|
|
27
|
+
import dotAnimation from "../../assets/images/anims/service_list/dot_animation.json";
|
|
27
28
|
|
|
28
29
|
import RatingBlock from "../../ui/RatingBlock";
|
|
29
30
|
import DurationBlock from "../../ui/DurationBlock";
|
|
@@ -69,6 +70,9 @@ const ANIMATION_MAP: Record<string, Record<string, any>> = {
|
|
|
69
70
|
bombAnimation: {
|
|
70
71
|
kupos: bombAnimation,
|
|
71
72
|
},
|
|
73
|
+
dotAnimation: {
|
|
74
|
+
kupos: dotAnimation,
|
|
75
|
+
},
|
|
72
76
|
};
|
|
73
77
|
|
|
74
78
|
function ServiceItemPB({
|
|
@@ -187,6 +191,17 @@ function ServiceItemPB({
|
|
|
187
191
|
|
|
188
192
|
const isItemExpanded = serviceItem.id === isExpand || isExpand === true;
|
|
189
193
|
const grayscaleClass = isSoldOut ? "grayscale" : "";
|
|
194
|
+
const hasOfferText = Boolean(serviceItem?.offer_text);
|
|
195
|
+
const offerGradient = "linear-gradient(90deg, #ff5964 0%, #ff8842 100%)";
|
|
196
|
+
const serviceCardStyle: React.CSSProperties = hasOfferText
|
|
197
|
+
? {
|
|
198
|
+
borderColor: "transparent",
|
|
199
|
+
borderStyle: "solid",
|
|
200
|
+
borderWidth: "6px 6px 0 6px",
|
|
201
|
+
borderRadius: isItemExpanded ? "18px 18px 0 0" : "18px",
|
|
202
|
+
background: `linear-gradient(#fff, #fff) padding-box, ${offerGradient} border-box`,
|
|
203
|
+
}
|
|
204
|
+
: {};
|
|
190
205
|
|
|
191
206
|
const renderIcon = (iconKey: string, size: string = "14px") => {
|
|
192
207
|
const iconValue = serviceItem.icons?.[iconKey];
|
|
@@ -350,20 +365,6 @@ function ServiceItemPB({
|
|
|
350
365
|
),
|
|
351
366
|
},
|
|
352
367
|
|
|
353
|
-
// {
|
|
354
|
-
// key: "directo",
|
|
355
|
-
// width: "12%",
|
|
356
|
-
// condition: serviceItem?.is_direct_trip === true,
|
|
357
|
-
// render: (
|
|
358
|
-
// <DirectoBlock
|
|
359
|
-
// translation={translation}
|
|
360
|
-
// getAnimationIcon={getAnimationIcon}
|
|
361
|
-
// colors={colors}
|
|
362
|
-
// isSoldOut={isSoldOut}
|
|
363
|
-
// />
|
|
364
|
-
// ),
|
|
365
|
-
// },
|
|
366
|
-
|
|
367
368
|
{
|
|
368
369
|
key: "pet",
|
|
369
370
|
width: "20%",
|
|
@@ -432,13 +433,7 @@ function ServiceItemPB({
|
|
|
432
433
|
/>
|
|
433
434
|
) : (
|
|
434
435
|
<div
|
|
435
|
-
|
|
436
|
-
// serviceItem.offer_text ? "mb-[55px]" : "mb-[10px]"
|
|
437
|
-
// } mt-[14px]`}
|
|
438
|
-
|
|
439
|
-
className={`relative ${
|
|
440
|
-
serviceItem.offer_text ? "mb-[55px]" : "mb-[10px]"
|
|
441
|
-
} ${
|
|
436
|
+
className={`relative ${hasOfferText ? "mb-[55px]" : "mb-[10px]"} ${
|
|
442
437
|
serviceItem?.is_direct_trip ||
|
|
443
438
|
serviceItem?.train_type_label === "Tren Express (Nuevo)" ||
|
|
444
439
|
showTopLabel
|
|
@@ -446,41 +441,14 @@ function ServiceItemPB({
|
|
|
446
441
|
: "mt-[20px]"
|
|
447
442
|
} `}
|
|
448
443
|
>
|
|
449
|
-
{/* <TopAmenities
|
|
450
|
-
showPromo={showPromo}
|
|
451
|
-
showTopLabel={showTopLabel}
|
|
452
|
-
isSoldOut={isSoldOut}
|
|
453
|
-
priceColor={colors.priceColor}
|
|
454
|
-
buttonColor={colors.kuposButtonColor}
|
|
455
|
-
boardingIcon={renderIcon("whiteBoardingIcon", "14px")}
|
|
456
|
-
getAnimationIcon={getAnimationIcon}
|
|
457
|
-
countdownSeconds={countdownSeconds}
|
|
458
|
-
onCountdownEnd={() => {
|
|
459
|
-
const cardEl = document.getElementById(
|
|
460
|
-
`service-card-${serviceItem.id}`,
|
|
461
|
-
);
|
|
462
|
-
if (!cardEl) return;
|
|
463
|
-
cardEl.style.border = "1px solid #ccc";
|
|
464
|
-
if (!showTopLabel) {
|
|
465
|
-
cardEl.style.borderRadius = "10px";
|
|
466
|
-
}
|
|
467
|
-
}}
|
|
468
|
-
offerText={serviceItem?.offer_text}
|
|
469
|
-
/> */}
|
|
470
444
|
<div
|
|
471
445
|
id={`service-card-${serviceItem.id}`}
|
|
472
|
-
className=
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
// borderRadius: showTopLabel
|
|
479
|
-
// ? "10px 0 10px 10px"
|
|
480
|
-
// : countdownSeconds > 0 && serviceItem?.offer_text
|
|
481
|
-
// ? "10px 0 10px 10px"
|
|
482
|
-
// : "10px",
|
|
483
|
-
// }}
|
|
446
|
+
className={`bg-white mx-auto relative ${
|
|
447
|
+
hasOfferText
|
|
448
|
+
? "rounded-[18px]"
|
|
449
|
+
: "rounded-[10px] border border-[#ccc]"
|
|
450
|
+
}`}
|
|
451
|
+
style={serviceCardStyle}
|
|
484
452
|
>
|
|
485
453
|
<div
|
|
486
454
|
className=" pt-[20px]"
|
|
@@ -491,7 +459,6 @@ function ServiceItemPB({
|
|
|
491
459
|
}}
|
|
492
460
|
>
|
|
493
461
|
<div
|
|
494
|
-
// className="grid text-[#464647] w-full [rid-template-columns:18%_28%_2.5%_28%_15.5%] gap-x-[2%] items-center"
|
|
495
462
|
className="grid text-[#464647] w-full [grid-template-columns:22%_28%_2.5%_24%_15.5%] gap-x-[2%] items-center"
|
|
496
463
|
style={{
|
|
497
464
|
marginTop:
|
|
@@ -499,17 +466,8 @@ function ServiceItemPB({
|
|
|
499
466
|
}}
|
|
500
467
|
>
|
|
501
468
|
{/* OPERATOR LOGO */}
|
|
502
|
-
<div
|
|
503
|
-
|
|
504
|
-
display: "flex",
|
|
505
|
-
flexDirection: "column",
|
|
506
|
-
gap: "5px",
|
|
507
|
-
}}
|
|
508
|
-
>
|
|
509
|
-
<div
|
|
510
|
-
// className="flex items-center justify-center m-[auto]"
|
|
511
|
-
className=""
|
|
512
|
-
>
|
|
469
|
+
<div className="flex flex-col gap-[5px]">
|
|
470
|
+
<div>
|
|
513
471
|
<img
|
|
514
472
|
src={serviceItem.operator_details[0]}
|
|
515
473
|
alt="service logo"
|
|
@@ -565,6 +523,7 @@ function ServiceItemPB({
|
|
|
565
523
|
currencySign={currencySign}
|
|
566
524
|
removeDuplicateSeats={removeDuplicateSeats}
|
|
567
525
|
isPeru={isPeru}
|
|
526
|
+
renderIcon={renderIcon}
|
|
568
527
|
/>
|
|
569
528
|
</div>
|
|
570
529
|
|
|
@@ -595,6 +554,21 @@ function ServiceItemPB({
|
|
|
595
554
|
soldOutIcon={renderIcon("soldOutIcon", "14px")}
|
|
596
555
|
onClick={checkMidnight}
|
|
597
556
|
/>
|
|
557
|
+
{showLastSeats ? (
|
|
558
|
+
<div
|
|
559
|
+
className="flex justify-end mr-[11px] w-[100%] right-[0px]"
|
|
560
|
+
style={{
|
|
561
|
+
top: serviceDetailsLoading ? "-17px" : "-20px",
|
|
562
|
+
}}
|
|
563
|
+
>
|
|
564
|
+
{serviceItem?.available_seats < 10 &&
|
|
565
|
+
serviceItem?.available_seats > 0 && (
|
|
566
|
+
<div className="text-[12px] text-[#464647] mt-1 text-center">
|
|
567
|
+
¡Últimos Asientos!
|
|
568
|
+
</div>
|
|
569
|
+
)}
|
|
570
|
+
</div>
|
|
571
|
+
) : null}
|
|
598
572
|
</div>
|
|
599
573
|
</div>
|
|
600
574
|
<BottomAmenities
|
|
@@ -630,7 +604,19 @@ function ServiceItemPB({
|
|
|
630
604
|
}}
|
|
631
605
|
>
|
|
632
606
|
<div
|
|
633
|
-
style={{
|
|
607
|
+
style={{
|
|
608
|
+
overflow: "hidden",
|
|
609
|
+
minHeight: 0,
|
|
610
|
+
marginTop: "-10px",
|
|
611
|
+
...(hasOfferText
|
|
612
|
+
? {
|
|
613
|
+
borderLeft: "6px solid #ff5964",
|
|
614
|
+
borderRight: "6px solid #ff8842",
|
|
615
|
+
borderRadius: "0 0 18px 18px",
|
|
616
|
+
boxSizing: "border-box",
|
|
617
|
+
}
|
|
618
|
+
: {}),
|
|
619
|
+
}}
|
|
634
620
|
>
|
|
635
621
|
<ExpandedDropdown
|
|
636
622
|
serviceItem={serviceItem}
|
|
@@ -649,35 +635,10 @@ function ServiceItemPB({
|
|
|
649
635
|
<div
|
|
650
636
|
className="text-white p-[10px_15px] text-left w-full flex items-center absolute -bottom-[36px] pt-[50px] -z-10 rounded-b-[14px] text-[14px]"
|
|
651
637
|
style={{
|
|
652
|
-
|
|
638
|
+
background: offerGradient,
|
|
653
639
|
opacity: isSoldOut ? 0.5 : 1,
|
|
654
640
|
}}
|
|
655
641
|
>
|
|
656
|
-
{/* <div className="flex justify-between items-center w-full">
|
|
657
|
-
<div className="flex items-center">
|
|
658
|
-
<LottiePlayer
|
|
659
|
-
animationData={getAnimationIcon("bombAnimation")}
|
|
660
|
-
width="18px"
|
|
661
|
-
height="18px"
|
|
662
|
-
/>
|
|
663
|
-
<span className="bold-text ml-[8px]">
|
|
664
|
-
{" "}
|
|
665
|
-
{serviceItem?.offer_text || ""}
|
|
666
|
-
</span>
|
|
667
|
-
</div>
|
|
668
|
-
<div>
|
|
669
|
-
Termina en
|
|
670
|
-
<span
|
|
671
|
-
className="bold-text text-end"
|
|
672
|
-
ref={startCountdown}
|
|
673
|
-
style={{
|
|
674
|
-
fontVariantNumeric: "tabular-nums",
|
|
675
|
-
display: "inline-block",
|
|
676
|
-
// minWidth: "70px",
|
|
677
|
-
}}
|
|
678
|
-
/>
|
|
679
|
-
</div>
|
|
680
|
-
</div> */}
|
|
681
642
|
<div className="flex justify-between items-center w-full">
|
|
682
643
|
<div className="flex items-center ">
|
|
683
644
|
<div className="flex items-center">
|
|
@@ -704,8 +665,13 @@ function ServiceItemPB({
|
|
|
704
665
|
</div>
|
|
705
666
|
</div>
|
|
706
667
|
<div className="flex items-center">
|
|
707
|
-
{renderIcon("personIcon", "16px")}
|
|
708
|
-
|
|
668
|
+
{/* {renderIcon("personIcon", "16px")} */}
|
|
669
|
+
<LottiePlayer
|
|
670
|
+
animationData={getAnimationIcon("dotAnimation")}
|
|
671
|
+
width="12px"
|
|
672
|
+
height="12px"
|
|
673
|
+
/>
|
|
674
|
+
|
|
709
675
|
<span className="ml-[6px]">
|
|
710
676
|
<span
|
|
711
677
|
className="bold-text"
|
|
@@ -722,23 +688,18 @@ function ServiceItemPB({
|
|
|
722
688
|
</div>
|
|
723
689
|
</div>
|
|
724
690
|
)}
|
|
725
|
-
<div className="absolute -top-[11px] left-0 w-full flex items-center justify-end gap-[12px] pr-[
|
|
691
|
+
<div className="absolute -top-[11px] left-0 w-full flex items-center justify-end gap-[12px] pr-[22px] z-10 ">
|
|
726
692
|
{showTopLabel && (
|
|
727
693
|
<div
|
|
728
694
|
className={`flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-10`}
|
|
729
695
|
style={{
|
|
730
|
-
backgroundColor:
|
|
731
|
-
|
|
732
|
-
|
|
696
|
+
backgroundColor: "#fff",
|
|
697
|
+
border: `1px solid ${colors.topLabelColor}`,
|
|
698
|
+
color: colors.topLabelColor,
|
|
733
699
|
}}
|
|
734
700
|
>
|
|
735
701
|
<div className={isSoldOut ? "grayscale" : ""}>
|
|
736
|
-
|
|
737
|
-
// animationData={serviceItem.icons.priorityStageAnim}
|
|
738
|
-
animationData={getAnimationIcon("priorityStageAnim")}
|
|
739
|
-
width="14px"
|
|
740
|
-
height="14px"
|
|
741
|
-
/>
|
|
702
|
+
{renderIcon("specialDeparture", "12px")}
|
|
742
703
|
</div>
|
|
743
704
|
<div
|
|
744
705
|
className={
|
|
@@ -751,50 +712,43 @@ function ServiceItemPB({
|
|
|
751
712
|
)}
|
|
752
713
|
{serviceItem?.is_transpordo && (
|
|
753
714
|
<div
|
|
754
|
-
className={`flex items-center gap-[10px] py-[4px]
|
|
715
|
+
className={`flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-20`}
|
|
755
716
|
style={{
|
|
756
|
-
backgroundColor:
|
|
717
|
+
backgroundColor: "#fff",
|
|
718
|
+
border: `1px solid ${colors.topLabelColor}`,
|
|
719
|
+
color: colors.topLabelColor,
|
|
757
720
|
}}
|
|
758
721
|
>
|
|
759
722
|
{renderIcon("connectingServiceIcon", "12px")}
|
|
760
|
-
|
|
761
|
-
animationData={serviceItem.icons.connectingServiceIcon}
|
|
762
|
-
// animationData={getAnimationIcon(connectingServiceIcon)}
|
|
763
|
-
width="14px"
|
|
764
|
-
height="14px"
|
|
765
|
-
/> */}
|
|
723
|
+
|
|
766
724
|
<div>{"Conexión"}</div>
|
|
767
725
|
</div>
|
|
768
726
|
)}
|
|
769
727
|
{serviceItem?.is_direct_trip && (
|
|
770
728
|
<div
|
|
771
|
-
className={`flex items-center gap-[10px] py-[4px]
|
|
729
|
+
className={`flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-20 `}
|
|
772
730
|
style={{
|
|
773
|
-
backgroundColor:
|
|
731
|
+
backgroundColor: "#fff",
|
|
732
|
+
border: `1px solid ${colors.topLabelColor}`,
|
|
733
|
+
color: colors.topLabelColor,
|
|
774
734
|
}}
|
|
775
735
|
>
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
animationData={getAnimationIcon("directoAnim")}
|
|
779
|
-
width="14px"
|
|
780
|
-
height="14px"
|
|
781
|
-
/>
|
|
736
|
+
{renderIcon("directo", "12px")}
|
|
737
|
+
|
|
782
738
|
<div>{translation?.directService}</div>
|
|
783
739
|
</div>
|
|
784
740
|
)}
|
|
785
741
|
{serviceItem?.train_type_label === "Tren Express (Nuevo)" && (
|
|
786
742
|
<div
|
|
787
|
-
className={`flex items-center gap-[10px] py-[4px]
|
|
743
|
+
className={`flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-20 `}
|
|
788
744
|
style={{
|
|
789
|
-
backgroundColor:
|
|
745
|
+
backgroundColor: "#fff",
|
|
746
|
+
border: `1px solid ${colors.topLabelColor}`,
|
|
747
|
+
color: colors.topLabelColor,
|
|
790
748
|
}}
|
|
791
749
|
>
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
animationData={getAnimationIcon("directoAnim")}
|
|
795
|
-
width="14px"
|
|
796
|
-
height="14px"
|
|
797
|
-
/>
|
|
750
|
+
{renderIcon("directo", "12px")}
|
|
751
|
+
|
|
798
752
|
<div>{"Tren Express"}</div>
|
|
799
753
|
</div>
|
|
800
754
|
)}
|
|
@@ -50,6 +50,18 @@ function ServiceItemMobile({
|
|
|
50
50
|
let isSoldOut = serviceItem.available_seats <= 0;
|
|
51
51
|
const isLongOfferText = (serviceItem?.offer_text?.length || 0) > 35;
|
|
52
52
|
|
|
53
|
+
const hasOfferText = Boolean(serviceItem?.offer_text);
|
|
54
|
+
const offerGradient = "linear-gradient(90deg, #ff5964 0%, #ff8842 100%)";
|
|
55
|
+
const serviceCardStyle: React.CSSProperties = hasOfferText
|
|
56
|
+
? {
|
|
57
|
+
borderColor: "transparent",
|
|
58
|
+
borderStyle: "solid",
|
|
59
|
+
borderWidth: "6px 6px 0 6px",
|
|
60
|
+
borderRadius: "18px",
|
|
61
|
+
background: `linear-gradient(#fff, #fff) padding-box, ${offerGradient} border-box`,
|
|
62
|
+
}
|
|
63
|
+
: {};
|
|
64
|
+
|
|
53
65
|
const startViewerCount = (node: HTMLSpanElement | null) => {
|
|
54
66
|
if (!node || !viewersConfig) return;
|
|
55
67
|
|
|
@@ -174,9 +186,6 @@ function ServiceItemMobile({
|
|
|
174
186
|
|
|
175
187
|
return (
|
|
176
188
|
<div
|
|
177
|
-
// className={`relative ${
|
|
178
|
-
// serviceItem.offer_text ? "mb-[55px]" : "mb-[14px]"
|
|
179
|
-
// }
|
|
180
189
|
className={`relative ${!serviceItem.offer_text ? "mb-[14px]" : showTopLabel || serviceItem?.is_direct_trip ? "mb-[20px]" : "mb-[12px]"} ${
|
|
181
190
|
serviceItem?.is_direct_trip ||
|
|
182
191
|
isConexion ||
|
|
@@ -187,34 +196,13 @@ function ServiceItemMobile({
|
|
|
187
196
|
} `}
|
|
188
197
|
style={{ backgroundColor: "#fff", zIndex: 1 }}
|
|
189
198
|
>
|
|
190
|
-
{/* <TopAmenitieMobile
|
|
191
|
-
showTopLabel={showTopLabel}
|
|
192
|
-
isSoldOut={isSoldOut}
|
|
193
|
-
seatPriceColor={colors.seatPriceColor}
|
|
194
|
-
bombAnim={serviceItem.icons.bombAnim}
|
|
195
|
-
priorityStageAnim={serviceItem.icons.priorityStageAnim}
|
|
196
|
-
countdownSeconds={countdownSeconds}
|
|
197
|
-
onCountdownEnd={() => {
|
|
198
|
-
const cardEl = document.getElementById(
|
|
199
|
-
`service-card-${serviceItem.id}`,
|
|
200
|
-
);
|
|
201
|
-
if (!cardEl) return;
|
|
202
|
-
cardEl.style.border = "1px solid #ccc";
|
|
203
|
-
if (!showTopLabel) {
|
|
204
|
-
cardEl.style.borderRadius = "10px";
|
|
205
|
-
}
|
|
206
|
-
}}
|
|
207
|
-
offerText={serviceItem?.offer_text}
|
|
208
|
-
/> */}
|
|
209
199
|
<div
|
|
210
|
-
className={
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
border: "1px solid #ccc",
|
|
217
|
-
}}
|
|
200
|
+
className={`bg-white z-1 ${
|
|
201
|
+
hasOfferText
|
|
202
|
+
? "rounded-[18px]"
|
|
203
|
+
: "rounded-[10px] border border-[#ccc]"
|
|
204
|
+
}`}
|
|
205
|
+
style={serviceCardStyle}
|
|
218
206
|
>
|
|
219
207
|
<div style={{ padding: "12px 12px 8px 12px" }}>
|
|
220
208
|
{/* Header with operator info and favorite */}
|
|
@@ -331,53 +319,58 @@ function ServiceItemMobile({
|
|
|
331
319
|
/>
|
|
332
320
|
</div>
|
|
333
321
|
|
|
334
|
-
<div className="absolute -top-[
|
|
322
|
+
<div className="absolute -top-[9px] left-0 w-full flex items-center justify-end gap-[12px] pr-[20px] z-10 ">
|
|
335
323
|
{showTopLabel && (
|
|
336
324
|
<div
|
|
337
325
|
className={`flex items-center gap-[2px] py-[4px] px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] z-20 `}
|
|
338
326
|
style={{
|
|
339
|
-
backgroundColor:
|
|
327
|
+
backgroundColor: "#fff",
|
|
328
|
+
border: `1px solid ${colors.topLabelColor}`,
|
|
329
|
+
color: colors.topLabelColor,
|
|
340
330
|
}}
|
|
341
331
|
>
|
|
342
332
|
<div className={isSoldOut ? "grayscale" : ""}>
|
|
343
|
-
|
|
333
|
+
{renderIcon("specialDeparture", "12px")}
|
|
334
|
+
{/* <LottiePlayer
|
|
344
335
|
animationData={serviceItem.icons.priorityStageAnim}
|
|
345
336
|
width="18px"
|
|
346
337
|
height="18px"
|
|
347
|
-
/>
|
|
338
|
+
/> */}
|
|
348
339
|
</div>
|
|
349
340
|
<div
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
}
|
|
341
|
+
style={{
|
|
342
|
+
color: colors.topLabelColor,
|
|
343
|
+
}}
|
|
353
344
|
>
|
|
354
345
|
{showTopLabel}
|
|
355
346
|
</div>
|
|
356
347
|
</div>
|
|
357
348
|
)}
|
|
358
|
-
{serviceItem?.is_direct_trip
|
|
349
|
+
{serviceItem?.is_direct_trip && (
|
|
359
350
|
<div
|
|
360
|
-
className={`flex items-center gap-[2px] py-[5px]
|
|
351
|
+
className={`flex items-center gap-[2px] py-[5px] px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] z-20 `}
|
|
361
352
|
style={{
|
|
362
|
-
backgroundColor:
|
|
363
|
-
|
|
353
|
+
backgroundColor: "#fff",
|
|
354
|
+
border: `1px solid ${colors.topLabelColor}`,
|
|
355
|
+
color: colors.topLabelColor,
|
|
364
356
|
}}
|
|
365
357
|
>
|
|
366
|
-
|
|
358
|
+
{renderIcon("directo", "12px")}
|
|
359
|
+
{/* <LottiePlayer
|
|
367
360
|
animationData={serviceItem.icons.directoAnim}
|
|
368
361
|
width="16px"
|
|
369
362
|
height="16px"
|
|
370
|
-
/>
|
|
363
|
+
/> */}
|
|
371
364
|
<div className="ml-[5px]">Directo</div>
|
|
372
365
|
</div>
|
|
373
366
|
)}
|
|
374
367
|
{isConexion && (
|
|
375
368
|
<div
|
|
376
|
-
className={`flex items-center gap-[2px] py-[5px] text-white px-[10px] rounded-[38px] min-[420]:text-[12px] text-[11px] z-20
|
|
377
|
-
isSoldOut ? "text-white" : `text-[${colors.topLabelColor}]`
|
|
378
|
-
}`}
|
|
369
|
+
className={`flex items-center gap-[2px] py-[5px] text-white px-[10px] rounded-[38px] min-[420]:text-[12px] text-[11px] z-20 `}
|
|
379
370
|
style={{
|
|
380
|
-
backgroundColor:
|
|
371
|
+
backgroundColor: "#fff",
|
|
372
|
+
border: `1px solid ${colors.topLabelColor}`,
|
|
373
|
+
color: colors.topLabelColor,
|
|
381
374
|
}}
|
|
382
375
|
>
|
|
383
376
|
{renderIcon("airportIcon", "14px")}
|
|
@@ -390,14 +383,17 @@ function ServiceItemMobile({
|
|
|
390
383
|
<div
|
|
391
384
|
className={`flex items-center gap-[2px] py-[5px] text-white px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] z-20 `}
|
|
392
385
|
style={{
|
|
393
|
-
backgroundColor:
|
|
386
|
+
backgroundColor: "#fff",
|
|
387
|
+
border: `1px solid ${colors.topLabelColor}`,
|
|
388
|
+
color: colors.topLabelColor,
|
|
394
389
|
}}
|
|
395
390
|
>
|
|
396
|
-
|
|
391
|
+
{renderIcon("directo", "12px")}
|
|
392
|
+
{/* <LottiePlayer
|
|
397
393
|
animationData={serviceItem.icons.directoAnim}
|
|
398
394
|
width="20px"
|
|
399
395
|
height="20px"
|
|
400
|
-
/>
|
|
396
|
+
/> */}
|
|
401
397
|
<div>{"Tren Express"}</div>
|
|
402
398
|
</div>
|
|
403
399
|
)}
|
|
@@ -409,7 +405,7 @@ function ServiceItemMobile({
|
|
|
409
405
|
<div
|
|
410
406
|
className="px-[12px] pt-[22px] pb-[8px] relative -z-9 -mt-[15px]"
|
|
411
407
|
style={{
|
|
412
|
-
|
|
408
|
+
background: isSoldOut ? "#ccc" : offerGradient,
|
|
413
409
|
opacity: isSoldOut ? 0.5 : 1,
|
|
414
410
|
borderRadius: "0 0 14px 14px",
|
|
415
411
|
zIndex: -1,
|
|
@@ -419,15 +415,79 @@ function ServiceItemMobile({
|
|
|
419
415
|
className="flex flex-col gap-[8px] text-[12px] min-[420px]:text-[12px] text-[#464647]"
|
|
420
416
|
style={{ lineHeight: 1.6 }}
|
|
421
417
|
>
|
|
422
|
-
<div className="flex
|
|
418
|
+
<div className="flex justify-between items-center">
|
|
419
|
+
<div
|
|
420
|
+
className={`flex ${isLongOfferText ? "items-start" : "items-center"}`}
|
|
421
|
+
>
|
|
422
|
+
<div className={isLongOfferText ? "mt-[2px]" : ""}>
|
|
423
|
+
<LottiePlayer
|
|
424
|
+
animationData={serviceItem.icons.bombAnim}
|
|
425
|
+
width="12px"
|
|
426
|
+
height="12px"
|
|
427
|
+
/>
|
|
428
|
+
</div>
|
|
429
|
+
<div
|
|
430
|
+
className={`ml-[4px] flex-1 outline-none ${isLongOfferText ? "mt-[2px]" : ""}`}
|
|
431
|
+
style={{
|
|
432
|
+
color: "#fff",
|
|
433
|
+
lineHeight: 1.4,
|
|
434
|
+
}}
|
|
435
|
+
>
|
|
436
|
+
{/* <span className="min-[380px]:text-[12px] bold-text">
|
|
437
|
+
{serviceItem?.offer_text || ""}
|
|
438
|
+
</span>{" "} */}
|
|
439
|
+
{/* <span className="min-[380px]:text-[12px]">|</span>{" "} */}
|
|
440
|
+
<span className="whitespace-nowrap min-[380px]:text-[12px]">
|
|
441
|
+
Termina en
|
|
442
|
+
<span
|
|
443
|
+
className="bold-text"
|
|
444
|
+
ref={startCountdown}
|
|
445
|
+
style={{
|
|
446
|
+
fontVariantNumeric: "tabular-nums",
|
|
447
|
+
display: "inline-block",
|
|
448
|
+
}}
|
|
449
|
+
/>
|
|
450
|
+
</span>
|
|
451
|
+
</div>
|
|
452
|
+
</div>
|
|
453
|
+
<div
|
|
454
|
+
className="flex items-center"
|
|
455
|
+
style={{
|
|
456
|
+
color: "#fff",
|
|
457
|
+
}}
|
|
458
|
+
>
|
|
459
|
+
<div className="mr-[4px]">
|
|
460
|
+
{" "}
|
|
461
|
+
<LottiePlayer
|
|
462
|
+
animationData={serviceItem.icons.dotAnimation}
|
|
463
|
+
width="12px"
|
|
464
|
+
height="12px"
|
|
465
|
+
/>
|
|
466
|
+
</div>
|
|
467
|
+
<span className="flex-1" style={{ lineHeight: 1.4 }}>
|
|
468
|
+
<span
|
|
469
|
+
className="bold-text"
|
|
470
|
+
ref={startViewerCount}
|
|
471
|
+
style={{ fontVariantNumeric: "tabular-nums" }}
|
|
472
|
+
/>{" "}
|
|
473
|
+
<span className="bold-text">personas</span>{" "}
|
|
474
|
+
<span>
|
|
475
|
+
{" "}
|
|
476
|
+
{/* {viewersConfig.label || " están viendo este viaje"} */}
|
|
477
|
+
viendo
|
|
478
|
+
</span>
|
|
479
|
+
</span>
|
|
480
|
+
</div>
|
|
481
|
+
</div>
|
|
482
|
+
{/* <div className="flex flex-col gap-[4px]">
|
|
423
483
|
<div
|
|
424
484
|
className={`flex ${isLongOfferText ? "items-start" : "items-center"}`}
|
|
425
485
|
>
|
|
426
486
|
<div className={isLongOfferText ? "mt-[2px]" : ""}>
|
|
427
487
|
<LottiePlayer
|
|
428
488
|
animationData={serviceItem.icons.bombAnim}
|
|
429
|
-
width="
|
|
430
|
-
height="
|
|
489
|
+
width="12px"
|
|
490
|
+
height="12px"
|
|
431
491
|
/>
|
|
432
492
|
</div>
|
|
433
493
|
<div
|
|
@@ -474,7 +534,7 @@ function ServiceItemMobile({
|
|
|
474
534
|
</span>
|
|
475
535
|
</span>
|
|
476
536
|
</div>
|
|
477
|
-
</div>
|
|
537
|
+
</div> */}
|
|
478
538
|
</div>
|
|
479
539
|
</div>
|
|
480
540
|
)}
|
|
@@ -117,6 +117,9 @@ export interface MobileServiceItemProps {
|
|
|
117
117
|
whiteBoardingIcon?: string;
|
|
118
118
|
downArrow?: string;
|
|
119
119
|
personIcon?: string
|
|
120
|
+
specialDeparture?: string;
|
|
121
|
+
fireIcon?: string;
|
|
122
|
+
directoIcon?: string;
|
|
120
123
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
121
124
|
};
|
|
122
125
|
useLottieFor?: string[];
|
package/src/types.ts
CHANGED
|
@@ -112,6 +112,8 @@ export interface ServiceItemProps {
|
|
|
112
112
|
wifiIcon?: string;
|
|
113
113
|
cortinaIcon?: string;
|
|
114
114
|
frazaIcon?: string;
|
|
115
|
+
specialDeparture?: string;
|
|
116
|
+
fireIcon?: string;
|
|
115
117
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
116
118
|
};
|
|
117
119
|
useLottieFor?: string[];
|