kupos-ui-components-lib 9.6.9 → 9.7.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/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemDesktop.js +8 -3
- package/dist/components/ServiceItem/ServiceItemMobile.js +1 -1
- package/dist/components/ServiceItem/mobileTypes.d.ts +1 -0
- package/dist/components/ServiceItem/types.d.ts +7 -0
- package/dist/styles.css +114 -0
- package/dist/types.d.ts +1 -0
- package/dist/ui/ExpendedDropDown/ExpandedDropdown.d.ts +2 -1
- package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +6 -4
- package/dist/ui/mobileweb/ExpandedDropdownMobile.d.ts +2 -1
- package/dist/ui/mobileweb/ExpandedDropdownMobile.js +6 -3
- package/package.json +1 -1
- package/src/assets/images/anims/service_list/thunder_icon.json +1 -0
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +20 -0
- package/src/components/ServiceItem/ServiceItemMobile.tsx +1 -0
- package/src/components/ServiceItem/mobileTypes.ts +1 -0
- package/src/components/ServiceItem/types.ts +8 -0
- package/src/types.ts +1 -0
- package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +12 -3
- package/src/ui/FeatureServiceUI/FeatureServiceUi.tsx +549 -0
- package/src/ui/mobileweb/ExpandedDropdownMobile.tsx +13 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ServiceItemProps } from "./types";
|
|
3
|
-
declare function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isPeruSites, showAvailableSeats, isSeatIcon, isLinatal, isPeru, t, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, showLoginModal, isLoggedIn, showLoginOption, }: ServiceItemProps & {
|
|
3
|
+
declare function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isPeruSites, showAvailableSeats, isSeatIcon, isLinatal, isPeru, t, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, isNewUi, showLoginModal, isLoggedIn, showLoginOption, }: ServiceItemProps & {
|
|
4
4
|
currencySign?: string;
|
|
5
5
|
}): React.ReactElement;
|
|
6
6
|
export default ServiceItemPB;
|
|
@@ -32,6 +32,8 @@ import KuposButton from "../../ui/KuposButton/KuposButton";
|
|
|
32
32
|
import BottomAmenities from "../../ui/BottomAmenities/BottomAmenities";
|
|
33
33
|
import SeatSection from "../../ui/SeatSection/SeatSection";
|
|
34
34
|
import DateTimeSection from "../../ui/DateTimeSection/DateTimeSection";
|
|
35
|
+
import FeatureServiceUi from "../../ui/FeatureServiceUI/FeatureServiceUi";
|
|
36
|
+
import thunderAnimation from "../../assets/images/anims/service_list/thunder_icon.json";
|
|
35
37
|
import ServiceBadges from "../../ui/ServiceBadges/ServiceBadges";
|
|
36
38
|
const SEAT_EXCEPTIONS = ["Asiento mascota"];
|
|
37
39
|
const ANIMATION_MAP = {
|
|
@@ -64,6 +66,9 @@ const ANIMATION_MAP = {
|
|
|
64
66
|
bombAnimation: {
|
|
65
67
|
kupos: bombAnimation,
|
|
66
68
|
},
|
|
69
|
+
thunderAnimation: {
|
|
70
|
+
kupos: thunderAnimation,
|
|
71
|
+
},
|
|
67
72
|
dotAnimation: {
|
|
68
73
|
kupos: dotAnimation,
|
|
69
74
|
},
|
|
@@ -74,7 +79,7 @@ const ANIMATION_MAP = {
|
|
|
74
79
|
kupos: femaleAnimation,
|
|
75
80
|
},
|
|
76
81
|
};
|
|
77
|
-
function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isPeruSites, showAvailableSeats, isSeatIcon, isLinatal, isPeru, t = (key) => key, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, showLoginModal, isLoggedIn, showLoginOption, }) {
|
|
82
|
+
function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isPeruSites, showAvailableSeats, isSeatIcon, isLinatal, isPeru, t = (key) => key, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, isNewUi, showLoginModal, isLoggedIn, showLoginOption, }) {
|
|
78
83
|
var _a;
|
|
79
84
|
const getAnimationIcon = (icon) => {
|
|
80
85
|
var _a;
|
|
@@ -243,7 +248,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
243
248
|
},
|
|
244
249
|
];
|
|
245
250
|
const otherItems = items.filter((i) => i.key !== "pet" && i.key !== "flexible" && !!i.condition);
|
|
246
|
-
return (React.createElement(React.Fragment, null, isPeruSites ? (React.createElement(PeruServiceItemDesktop, { serviceItem: serviceItem, onBookButtonPress: onBookButtonPress, colors: colors, metaData: metaData, children: children, busStage: busStage, serviceDetailsLoading: serviceDetailsLoading, cityOrigin: cityOrigin, cityDestination: cityDestination, translation: translation, orignLabel: orignLabel, destinationLabel: destinationLabel, currencySign: currencySign, isCiva: isCiva, showRating: showRating, showLastSeats: showLastSeats, removeArrivalTime: removeArrivalTime, removeDuplicateSeats: removeDuplicateSeats, isPeruSites: isPeruSites, t: (key) => t(key), showAvailableSeats: showAvailableSeats, isSeatIcon: isSeatIcon, isPeru: isPeru, siteType: siteType, isAllinBus: isAllinBus })) : (React.createElement("div", { className: `relative hover:z-[150] ${hasOfferText || hasDpEnabled ? "mb-[55px]" : "mb-[10px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
|
|
251
|
+
return (React.createElement(React.Fragment, null, isPeruSites ? (React.createElement(PeruServiceItemDesktop, { serviceItem: serviceItem, onBookButtonPress: onBookButtonPress, colors: colors, metaData: metaData, children: children, busStage: busStage, serviceDetailsLoading: serviceDetailsLoading, cityOrigin: cityOrigin, cityDestination: cityDestination, translation: translation, orignLabel: orignLabel, destinationLabel: destinationLabel, currencySign: currencySign, isCiva: isCiva, showRating: showRating, showLastSeats: showLastSeats, removeArrivalTime: removeArrivalTime, removeDuplicateSeats: removeDuplicateSeats, isPeruSites: isPeruSites, t: (key) => t(key), showAvailableSeats: showAvailableSeats, isSeatIcon: isSeatIcon, isPeru: isPeru, siteType: siteType, isAllinBus: isAllinBus })) : isNewUi ? (React.createElement(FeatureServiceUi, { serviceItem: serviceItem, showTopLabel: showTopLabel, colors: colors, isSoldOut: isSoldOut, getAnimationIcon: getAnimationIcon, cityOrigin: cityOrigin, cityDestination: cityDestination, renderIcon: renderIcon, viewersConfig: viewersConfig })) : (React.createElement("div", { className: `relative hover:z-[150] ${hasOfferText || hasDpEnabled ? "mb-[55px]" : "mb-[10px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
|
|
247
252
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
|
|
248
253
|
showTopLabel
|
|
249
254
|
? "mt-[24px]"
|
|
@@ -299,7 +304,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
299
304
|
boxSizing: "border-box",
|
|
300
305
|
}
|
|
301
306
|
: {})) },
|
|
302
|
-
React.createElement(ExpandedDropdown, { serviceItem: serviceItem, isPeru: isPeru, translation: translation, getAnimationIcon: getAnimationIcon, isChangeTicket: serviceItem.is_change_ticket === true, isSoldOut: isSoldOut, ladiesBookedSeats: serviceItem.ladies_booked_seats, isDpEnabled: serviceItem.is_dp_enabled })))),
|
|
307
|
+
React.createElement(ExpandedDropdown, { serviceItem: serviceItem, isPeru: isPeru, translation: translation, getAnimationIcon: getAnimationIcon, isChangeTicket: serviceItem.is_change_ticket === true, isSoldOut: isSoldOut, ladiesBookedSeats: serviceItem.ladies_booked_seats, isDpEnabled: serviceItem.is_dp_enabled, renderIcon: renderIcon })))),
|
|
303
308
|
children,
|
|
304
309
|
React.createElement(ServiceBadges, { showTopLabel: showTopLabel, isSoldOut: isSoldOut, colors: colors, renderIcon: renderIcon, translation: translation, serviceItem: serviceItem })))));
|
|
305
310
|
}
|
|
@@ -180,6 +180,6 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
|
|
|
180
180
|
zIndex: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ? -3 : undefined,
|
|
181
181
|
marginTop: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ? "-15px" : "-10px",
|
|
182
182
|
} },
|
|
183
|
-
React.createElement(ExpandedDropdownMobile, { serviceItem: serviceItem, isPeru: isPeru, petSeatInfo: serviceItem.pet_seat_info, petFriendlyAnim: serviceItem.icons.petFriendlyAnim, isSoldOut: isSoldOut, isChangeTicket: serviceItem.is_change_ticket === true, ladiesBookedSeats: serviceItem.ladies_booked_seats, isDpEnabled: serviceItem.is_dp_enabled, femaleAnim: serviceItem.icons.femaleAnim, flexibleAnim: serviceItem.icons.flexibleAnim })))));
|
|
183
|
+
React.createElement(ExpandedDropdownMobile, { serviceItem: serviceItem, isPeru: isPeru, petSeatInfo: serviceItem.pet_seat_info, petFriendlyAnim: serviceItem.icons.petFriendlyAnim, isSoldOut: isSoldOut, isChangeTicket: serviceItem.is_change_ticket === true, ladiesBookedSeats: serviceItem.ladies_booked_seats, isDpEnabled: serviceItem.is_dp_enabled, femaleAnim: serviceItem.icons.femaleAnim, flexibleAnim: serviceItem.icons.flexibleAnim, renderIcon: renderIcon })))));
|
|
184
184
|
}
|
|
185
185
|
export default ServiceItemMobile;
|
|
@@ -124,6 +124,7 @@ export interface MobileServiceItemProps {
|
|
|
124
124
|
directoIcon?: string;
|
|
125
125
|
whiteFireIcon?: string;
|
|
126
126
|
femaleAnim?: string;
|
|
127
|
+
cancelTicketIcon?: string;
|
|
127
128
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
128
129
|
};
|
|
129
130
|
useLottieFor?: string[];
|
|
@@ -129,6 +129,12 @@ export interface ServiceItemProps {
|
|
|
129
129
|
personIcon?: string;
|
|
130
130
|
whiteFireIcon?: string;
|
|
131
131
|
fireIcon?: string;
|
|
132
|
+
whiteOrigin?: string;
|
|
133
|
+
whiteDestination?: string;
|
|
134
|
+
userIcon?: string;
|
|
135
|
+
sheildIcon?: string;
|
|
136
|
+
busIcon?: string;
|
|
137
|
+
whiteDownArrow?: string;
|
|
132
138
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
133
139
|
};
|
|
134
140
|
useLottieFor?: string[];
|
|
@@ -221,6 +227,7 @@ export interface ServiceItemProps {
|
|
|
221
227
|
label?: string;
|
|
222
228
|
icon?: string;
|
|
223
229
|
};
|
|
230
|
+
isNewUi?: boolean;
|
|
224
231
|
showLoginModal?: any;
|
|
225
232
|
isLoggedIn?: any;
|
|
226
233
|
showLoginOption?: boolean;
|
package/dist/styles.css
CHANGED
|
@@ -63,6 +63,9 @@
|
|
|
63
63
|
.right-\[0px\] {
|
|
64
64
|
right: 0px;
|
|
65
65
|
}
|
|
66
|
+
.right-\[18px\] {
|
|
67
|
+
right: 18px;
|
|
68
|
+
}
|
|
66
69
|
.-bottom-\[9\%\] {
|
|
67
70
|
bottom: calc(9% * -1);
|
|
68
71
|
}
|
|
@@ -75,6 +78,9 @@
|
|
|
75
78
|
.-bottom-\[36px\] {
|
|
76
79
|
bottom: calc(36px * -1);
|
|
77
80
|
}
|
|
81
|
+
.bottom-\[11px\] {
|
|
82
|
+
bottom: 11px;
|
|
83
|
+
}
|
|
78
84
|
.bottom-\[35px\] {
|
|
79
85
|
bottom: 35px;
|
|
80
86
|
}
|
|
@@ -189,12 +195,21 @@
|
|
|
189
195
|
.mt-\[5px\] {
|
|
190
196
|
margin-top: 5px;
|
|
191
197
|
}
|
|
198
|
+
.mt-\[6px\] {
|
|
199
|
+
margin-top: 6px;
|
|
200
|
+
}
|
|
201
|
+
.mt-\[8px\] {
|
|
202
|
+
margin-top: 8px;
|
|
203
|
+
}
|
|
192
204
|
.mt-\[10px\] {
|
|
193
205
|
margin-top: 10px;
|
|
194
206
|
}
|
|
195
207
|
.mt-\[13px\] {
|
|
196
208
|
margin-top: 13px;
|
|
197
209
|
}
|
|
210
|
+
.mt-\[14px\] {
|
|
211
|
+
margin-top: 14px;
|
|
212
|
+
}
|
|
198
213
|
.mt-\[15px\] {
|
|
199
214
|
margin-top: 15px;
|
|
200
215
|
}
|
|
@@ -234,6 +249,9 @@
|
|
|
234
249
|
.mb-\[5px\] {
|
|
235
250
|
margin-bottom: 5px;
|
|
236
251
|
}
|
|
252
|
+
.mb-\[6px\] {
|
|
253
|
+
margin-bottom: 6px;
|
|
254
|
+
}
|
|
237
255
|
.mb-\[8px\] {
|
|
238
256
|
margin-bottom: 8px;
|
|
239
257
|
}
|
|
@@ -375,6 +393,9 @@
|
|
|
375
393
|
.w-\[20px\] {
|
|
376
394
|
width: 20px;
|
|
377
395
|
}
|
|
396
|
+
.w-\[30px\] {
|
|
397
|
+
width: 30px;
|
|
398
|
+
}
|
|
378
399
|
.w-\[50\%\] {
|
|
379
400
|
width: 50%;
|
|
380
401
|
}
|
|
@@ -443,6 +464,12 @@
|
|
|
443
464
|
.max-w-\[165px\] {
|
|
444
465
|
max-width: 165px;
|
|
445
466
|
}
|
|
467
|
+
.max-w-\[220px\] {
|
|
468
|
+
max-width: 220px;
|
|
469
|
+
}
|
|
470
|
+
.max-w-full {
|
|
471
|
+
max-width: 100%;
|
|
472
|
+
}
|
|
446
473
|
.min-w-\[75px\] {
|
|
447
474
|
min-width: 75px;
|
|
448
475
|
}
|
|
@@ -485,9 +512,15 @@
|
|
|
485
512
|
.grid-cols-2 {
|
|
486
513
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
487
514
|
}
|
|
515
|
+
.grid-cols-4 {
|
|
516
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
517
|
+
}
|
|
488
518
|
.grid-cols-\[0\.8fr_auto_26\%_1fr\] {
|
|
489
519
|
grid-template-columns: 0.8fr auto 26% 1fr;
|
|
490
520
|
}
|
|
521
|
+
.grid-cols-\[1\.3fr_2fr_1\.2fr\] {
|
|
522
|
+
grid-template-columns: 1.3fr 2fr 1.2fr;
|
|
523
|
+
}
|
|
491
524
|
.grid-cols-\[1\.5fr_1fr_auto\] {
|
|
492
525
|
grid-template-columns: 1.5fr 1fr auto;
|
|
493
526
|
}
|
|
@@ -518,6 +551,9 @@
|
|
|
518
551
|
.items-start {
|
|
519
552
|
align-items: flex-start;
|
|
520
553
|
}
|
|
554
|
+
.items-stretch {
|
|
555
|
+
align-items: stretch;
|
|
556
|
+
}
|
|
521
557
|
.justify-between {
|
|
522
558
|
justify-content: space-between;
|
|
523
559
|
}
|
|
@@ -560,6 +596,12 @@
|
|
|
560
596
|
.gap-\[14px\] {
|
|
561
597
|
gap: 14px;
|
|
562
598
|
}
|
|
599
|
+
.gap-\[16px\] {
|
|
600
|
+
gap: 16px;
|
|
601
|
+
}
|
|
602
|
+
.gap-\[20px\] {
|
|
603
|
+
gap: 20px;
|
|
604
|
+
}
|
|
563
605
|
.gap-x-\[2\%\] {
|
|
564
606
|
-moz-column-gap: 2%;
|
|
565
607
|
column-gap: 2%;
|
|
@@ -568,18 +610,29 @@
|
|
|
568
610
|
-moz-column-gap: 8px;
|
|
569
611
|
column-gap: 8px;
|
|
570
612
|
}
|
|
613
|
+
.truncate {
|
|
614
|
+
overflow: hidden;
|
|
615
|
+
text-overflow: ellipsis;
|
|
616
|
+
white-space: nowrap;
|
|
617
|
+
}
|
|
571
618
|
.overflow-hidden {
|
|
572
619
|
overflow: hidden;
|
|
573
620
|
}
|
|
574
621
|
.overflow-y-hidden {
|
|
575
622
|
overflow-y: hidden;
|
|
576
623
|
}
|
|
624
|
+
.rounded-\[4px\] {
|
|
625
|
+
border-radius: 4px;
|
|
626
|
+
}
|
|
577
627
|
.rounded-\[8px\] {
|
|
578
628
|
border-radius: 8px;
|
|
579
629
|
}
|
|
580
630
|
.rounded-\[10px\] {
|
|
581
631
|
border-radius: 10px;
|
|
582
632
|
}
|
|
633
|
+
.rounded-\[12px\] {
|
|
634
|
+
border-radius: 12px;
|
|
635
|
+
}
|
|
583
636
|
.rounded-\[14px\] {
|
|
584
637
|
border-radius: 14px;
|
|
585
638
|
}
|
|
@@ -629,6 +682,10 @@
|
|
|
629
682
|
border-top-style: var(--tw-border-style);
|
|
630
683
|
border-top-width: 8px;
|
|
631
684
|
}
|
|
685
|
+
.border-r {
|
|
686
|
+
border-right-style: var(--tw-border-style);
|
|
687
|
+
border-right-width: 1px;
|
|
688
|
+
}
|
|
632
689
|
.border-r-8 {
|
|
633
690
|
border-right-style: var(--tw-border-style);
|
|
634
691
|
border-right-width: 8px;
|
|
@@ -657,6 +714,10 @@
|
|
|
657
714
|
border-bottom-style: var(--tw-border-style);
|
|
658
715
|
border-bottom-width: 8px;
|
|
659
716
|
}
|
|
717
|
+
.border-l {
|
|
718
|
+
border-left-style: var(--tw-border-style);
|
|
719
|
+
border-left-width: 1px;
|
|
720
|
+
}
|
|
660
721
|
.border-l-8 {
|
|
661
722
|
border-left-style: var(--tw-border-style);
|
|
662
723
|
border-left-width: 8px;
|
|
@@ -673,6 +734,9 @@
|
|
|
673
734
|
--tw-border-style: none;
|
|
674
735
|
border-style: none;
|
|
675
736
|
}
|
|
737
|
+
.border-\[\#363c48\] {
|
|
738
|
+
border-color: #363c48;
|
|
739
|
+
}
|
|
676
740
|
.border-\[\#ccc\] {
|
|
677
741
|
border-color: #ccc;
|
|
678
742
|
}
|
|
@@ -691,9 +755,15 @@
|
|
|
691
755
|
.border-l-transparent {
|
|
692
756
|
border-left-color: transparent;
|
|
693
757
|
}
|
|
758
|
+
.bg-\[\#0C1421\] {
|
|
759
|
+
background-color: #0C1421;
|
|
760
|
+
}
|
|
694
761
|
.bg-\[\#E6E6E6\] {
|
|
695
762
|
background-color: #E6E6E6;
|
|
696
763
|
}
|
|
764
|
+
.bg-\[\#FF8F45\] {
|
|
765
|
+
background-color: #FF8F45;
|
|
766
|
+
}
|
|
697
767
|
.bg-\[\#FFF2F2\] {
|
|
698
768
|
background-color: #FFF2F2;
|
|
699
769
|
}
|
|
@@ -734,6 +804,9 @@
|
|
|
734
804
|
.p-\[10px_15px\] {
|
|
735
805
|
padding: 10px 15px;
|
|
736
806
|
}
|
|
807
|
+
.p-\[14px\] {
|
|
808
|
+
padding: 14px;
|
|
809
|
+
}
|
|
737
810
|
.p-\[15px\] {
|
|
738
811
|
padding: 15px;
|
|
739
812
|
}
|
|
@@ -767,9 +840,15 @@
|
|
|
767
840
|
.px-\[15px\] {
|
|
768
841
|
padding-inline: 15px;
|
|
769
842
|
}
|
|
843
|
+
.px-\[16px\] {
|
|
844
|
+
padding-inline: 16px;
|
|
845
|
+
}
|
|
770
846
|
.px-\[20px\] {
|
|
771
847
|
padding-inline: 20px;
|
|
772
848
|
}
|
|
849
|
+
.py-\[2px\] {
|
|
850
|
+
padding-block: 2px;
|
|
851
|
+
}
|
|
773
852
|
.py-\[4px\] {
|
|
774
853
|
padding-block: 4px;
|
|
775
854
|
}
|
|
@@ -797,6 +876,9 @@
|
|
|
797
876
|
.pt-\[10px\] {
|
|
798
877
|
padding-top: 10px;
|
|
799
878
|
}
|
|
879
|
+
.pt-\[14px\] {
|
|
880
|
+
padding-top: 14px;
|
|
881
|
+
}
|
|
800
882
|
.pt-\[20px\] {
|
|
801
883
|
padding-top: 20px;
|
|
802
884
|
}
|
|
@@ -821,6 +903,9 @@
|
|
|
821
903
|
.pr-\[22px\] {
|
|
822
904
|
padding-right: 22px;
|
|
823
905
|
}
|
|
906
|
+
.pb-\[6px\] {
|
|
907
|
+
padding-bottom: 6px;
|
|
908
|
+
}
|
|
824
909
|
.pb-\[7px\] {
|
|
825
910
|
padding-bottom: 7px;
|
|
826
911
|
}
|
|
@@ -887,6 +972,12 @@
|
|
|
887
972
|
.text-\[22px\] {
|
|
888
973
|
font-size: 22px;
|
|
889
974
|
}
|
|
975
|
+
.text-\[26px\] {
|
|
976
|
+
font-size: 26px;
|
|
977
|
+
}
|
|
978
|
+
.text-\[28px\] {
|
|
979
|
+
font-size: 28px;
|
|
980
|
+
}
|
|
890
981
|
.text-\[42px\] {
|
|
891
982
|
font-size: 42px;
|
|
892
983
|
}
|
|
@@ -894,6 +985,10 @@
|
|
|
894
985
|
--tw-leading: 1.3;
|
|
895
986
|
line-height: 1.3;
|
|
896
987
|
}
|
|
988
|
+
.leading-\[14px\] {
|
|
989
|
+
--tw-leading: 14px;
|
|
990
|
+
line-height: 14px;
|
|
991
|
+
}
|
|
897
992
|
.leading-\[20px\] {
|
|
898
993
|
--tw-leading: 20px;
|
|
899
994
|
line-height: 20px;
|
|
@@ -914,6 +1009,10 @@
|
|
|
914
1009
|
--tw-leading: 1;
|
|
915
1010
|
line-height: 1;
|
|
916
1011
|
}
|
|
1012
|
+
.font-\[9px\] {
|
|
1013
|
+
--tw-font-weight: 9px;
|
|
1014
|
+
font-weight: 9px;
|
|
1015
|
+
}
|
|
917
1016
|
.font-\[14px\] {
|
|
918
1017
|
--tw-font-weight: 14px;
|
|
919
1018
|
font-weight: 14px;
|
|
@@ -935,12 +1034,27 @@
|
|
|
935
1034
|
.whitespace-nowrap {
|
|
936
1035
|
white-space: nowrap;
|
|
937
1036
|
}
|
|
1037
|
+
.text-\[\#4a4a4a\] {
|
|
1038
|
+
color: #4a4a4a;
|
|
1039
|
+
}
|
|
938
1040
|
.text-\[\#9f9f9f\] {
|
|
939
1041
|
color: #9f9f9f;
|
|
940
1042
|
}
|
|
1043
|
+
.text-\[\#666\] {
|
|
1044
|
+
color: #666;
|
|
1045
|
+
}
|
|
1046
|
+
.text-\[\#171717\] {
|
|
1047
|
+
color: #171717;
|
|
1048
|
+
}
|
|
1049
|
+
.text-\[\#272727\] {
|
|
1050
|
+
color: #272727;
|
|
1051
|
+
}
|
|
941
1052
|
.text-\[\#464647\] {
|
|
942
1053
|
color: #464647;
|
|
943
1054
|
}
|
|
1055
|
+
.text-\[\#FF8F45\] {
|
|
1056
|
+
color: #FF8F45;
|
|
1057
|
+
}
|
|
944
1058
|
.text-\[\#c0c0c0\] {
|
|
945
1059
|
color: #c0c0c0;
|
|
946
1060
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -108,6 +108,7 @@ export interface ServiceItemProps {
|
|
|
108
108
|
frazaIcon?: string;
|
|
109
109
|
specialDeparture?: string;
|
|
110
110
|
fireIcon?: string;
|
|
111
|
+
cancelTicketIcon?: string;
|
|
111
112
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
112
113
|
};
|
|
113
114
|
useLottieFor?: string[];
|
|
@@ -13,6 +13,7 @@ interface ExpandedDropdownProps {
|
|
|
13
13
|
isSoldOut?: boolean;
|
|
14
14
|
ladiesBookedSeats?: string;
|
|
15
15
|
isDpEnabled?: boolean;
|
|
16
|
+
renderIcon?: any;
|
|
16
17
|
}
|
|
17
|
-
declare function ExpandedDropdown({ serviceItem, isPeru, translation, getAnimationIcon, isChangeTicket, isSoldOut, ladiesBookedSeats, isDpEnabled, }: ExpandedDropdownProps): React.ReactElement;
|
|
18
|
+
declare function ExpandedDropdown({ serviceItem, isPeru, translation, getAnimationIcon, isChangeTicket, isSoldOut, ladiesBookedSeats, isDpEnabled, renderIcon, }: ExpandedDropdownProps): React.ReactElement;
|
|
18
19
|
export default ExpandedDropdown;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import LottiePlayer from "../../assets/LottiePlayer";
|
|
3
|
-
function ExpandedDropdown({ serviceItem, isPeru = false, translation = {}, getAnimationIcon, isChangeTicket = false, isSoldOut, ladiesBookedSeats, isDpEnabled, }) {
|
|
3
|
+
function ExpandedDropdown({ serviceItem, isPeru = false, translation = {}, getAnimationIcon, isChangeTicket = false, isSoldOut, ladiesBookedSeats, isDpEnabled, renderIcon, }) {
|
|
4
4
|
const hasPetInfo = serviceItem.pet_seat_info &&
|
|
5
5
|
Object.keys(serviceItem.pet_seat_info).length > 0;
|
|
6
6
|
return (React.createElement("div", { className: "px-[15px] pt-[26px] pb-[14px] -mt-[16px] pt-[35px] relative -z-9", style: {
|
|
@@ -22,7 +22,9 @@ function ExpandedDropdown({ serviceItem, isPeru = false, translation = {}, getAn
|
|
|
22
22
|
" horas antes"),
|
|
23
23
|
" ",
|
|
24
24
|
"de la salida del bus. El monto ser\u00E1 reembolsado a tu billetera kupospay."))) : (React.createElement("div", { className: "flex gap-[8px] text-[13.33px]" },
|
|
25
|
-
React.createElement("span", { style: { marginTop: "2px" } },
|
|
25
|
+
React.createElement("span", { style: { marginTop: "2px" } },
|
|
26
|
+
" ",
|
|
27
|
+
React.createElement(LottiePlayer, { animationData: getAnimationIcon("flexibleIcon"), width: "20px", height: "20px" })),
|
|
26
28
|
React.createElement("span", null,
|
|
27
29
|
React.createElement("span", null,
|
|
28
30
|
React.createElement("span", { className: "bold-text" }, "Pasaje flexible:"),
|
|
@@ -33,7 +35,7 @@ function ExpandedDropdown({ serviceItem, isPeru = false, translation = {}, getAn
|
|
|
33
35
|
React.createElement("span", null, translation === null || translation === void 0 ? void 0 : translation.petFriendly)))),
|
|
34
36
|
ladiesBookedSeats &&
|
|
35
37
|
String(ladiesBookedSeats).trim() !== "" &&
|
|
36
|
-
isDpEnabled === true && (React.createElement("div", { className: "flex gap-[6px]" },
|
|
38
|
+
isDpEnabled === true && (React.createElement("div", { className: "flex gap-[6px] items-center" },
|
|
37
39
|
React.createElement("span", { style: { marginTop: "2px" } },
|
|
38
40
|
" ",
|
|
39
41
|
React.createElement(LottiePlayer, { animationData: getAnimationIcon("femaaleAnimation"), width: "20px", height: "20px" })),
|
|
@@ -41,7 +43,7 @@ function ExpandedDropdown({ serviceItem, isPeru = false, translation = {}, getAn
|
|
|
41
43
|
React.createElement("span", { className: "bold-text" }, "Asientos para damas:"),
|
|
42
44
|
" Esta empresa cuenta con asientos recomendados para mujeres."))),
|
|
43
45
|
React.createElement("div", { className: "flex gap-[8px] text-[13.33px]" },
|
|
44
|
-
React.createElement("span",
|
|
46
|
+
React.createElement("span", null, renderIcon("cancelTicketIcon", "14px")),
|
|
45
47
|
React.createElement("span", null,
|
|
46
48
|
React.createElement("span", { className: "bold-text" }, "Pol\u00EDticas de anulaci\u00F3n:"),
|
|
47
49
|
" Tu pasaje puede ser anulado de forma online",
|
|
@@ -15,6 +15,7 @@ interface ExpandedDropdownMobileProps {
|
|
|
15
15
|
isDpEnabled?: boolean;
|
|
16
16
|
femaleAnim?: any;
|
|
17
17
|
flexibleAnim?: any;
|
|
18
|
+
renderIcon?: any;
|
|
18
19
|
}
|
|
19
|
-
declare function ExpandedDropdownMobile({ serviceItem, isPeru, petSeatInfo, petFriendlyAnim, isSoldOut, isChangeTicket, ladiesBookedSeats, isDpEnabled, femaleAnim, flexibleAnim, }: ExpandedDropdownMobileProps): React.ReactElement;
|
|
20
|
+
declare function ExpandedDropdownMobile({ serviceItem, isPeru, petSeatInfo, petFriendlyAnim, isSoldOut, isChangeTicket, ladiesBookedSeats, isDpEnabled, femaleAnim, flexibleAnim, renderIcon, }: ExpandedDropdownMobileProps): React.ReactElement;
|
|
20
21
|
export default ExpandedDropdownMobile;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import LottiePlayer from "../../assets/LottiePlayer";
|
|
3
|
-
function ExpandedDropdownMobile({ serviceItem, isPeru, petSeatInfo, petFriendlyAnim, isSoldOut, isChangeTicket = false, ladiesBookedSeats, isDpEnabled, femaleAnim, flexibleAnim, }) {
|
|
3
|
+
function ExpandedDropdownMobile({ serviceItem, isPeru, petSeatInfo, petFriendlyAnim, isSoldOut, isChangeTicket = false, ladiesBookedSeats, isDpEnabled, femaleAnim, flexibleAnim, renderIcon, }) {
|
|
4
4
|
return (React.createElement("div", { className: "px-[12px] pt-[22px] pb-[12px] relative -z-9", style: {
|
|
5
5
|
backgroundColor: "#ffefef",
|
|
6
6
|
borderRadius: "0 0 14px 14px",
|
|
@@ -8,7 +8,10 @@ function ExpandedDropdownMobile({ serviceItem, isPeru, petSeatInfo, petFriendlyA
|
|
|
8
8
|
} },
|
|
9
9
|
React.createElement("div", { className: "flex flex-col gap-[8px] text-[11px] min-[420px]:text-[12px] text-[#464647]", style: { lineHeight: 1.6 } },
|
|
10
10
|
isPeru ? null : isChangeTicket ? (React.createElement("div", { className: "flex gap-[6px]" },
|
|
11
|
-
React.createElement("span", { style: { marginTop: "2px" } },
|
|
11
|
+
React.createElement("span", { style: { marginTop: "2px" } },
|
|
12
|
+
" ",
|
|
13
|
+
React.createElement("div", null,
|
|
14
|
+
React.createElement(LottiePlayer, { animationData: flexibleAnim, width: "16px", height: "16px" }))),
|
|
12
15
|
React.createElement("span", null,
|
|
13
16
|
React.createElement("span", { className: "bold-text" }, "Pasaje flexible:"),
|
|
14
17
|
" Tu pasaje puede ser cambiado de manera online",
|
|
@@ -49,7 +52,7 @@ function ExpandedDropdownMobile({ serviceItem, isPeru, petSeatInfo, petFriendlyA
|
|
|
49
52
|
" ",
|
|
50
53
|
"Asientos designados Pet friendly, lo que significa que puede viajar con su mascota a bordo."))))))) : null,
|
|
51
54
|
React.createElement("div", { className: "flex gap-[6px]" },
|
|
52
|
-
React.createElement("span",
|
|
55
|
+
React.createElement("span", null, renderIcon("cancelTicketIcon", "14px")),
|
|
53
56
|
React.createElement("span", null,
|
|
54
57
|
React.createElement("span", { className: "bold-text" }, "Pol\u00EDticas de anulaci\u00F3n:"),
|
|
55
58
|
" Tu pasaje puede ser anulado de forma online",
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"nm":"t","ddd":0,"h":500,"w":500,"meta":{"g":"@lottiefiles/toolkit-js 0.33.2"},"layers":[{"ty":4,"nm":"t","sr":1,"st":60,"op":90,"ip":60,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[256.655,268,0]},"s":{"a":0,"k":[100,100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256.655,268,0]},"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":[100],"t":89},{"s":[0],"t":90}]}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-35.799,-108.024],[135.03,-108.024],[135.015,-107.976],[-35.905,-107.905]]}],"t":60},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-35.799,-108.024],[135.03,-108.024],[-48.36,108.024],[-135.03,96.72]]}],"t":66}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":60},{"s":[100],"t":61}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[245.351,170.024]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]},{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-146.335,21.917],[-146.203,22.157],[-111.091,-49.844],[-111.165,-49.681]]}],"t":66},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-146.335,21.917],[66.749,49.681],[146.335,-25.815],[-111.165,-49.681]]}],"t":72}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":66},{"s":[100],"t":67}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256.655,244.827]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]},{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[85.348,-127.61],[40.195,-131.89],[134.402,-123.098]]}],"t":66},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[54.848,-47.61],[40.195,-131.89],[134.402,-123.098]]}],"t":72},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-134.402,131.89],[40.195,-131.89],[134.402,-123.098]]}],"t":78}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":72},{"s":[100],"t":73}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[268.588,342.11]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]}],"ind":1},{"ty":4,"nm":"t","sr":1,"st":30,"op":60,"ip":30,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[256.655,268,0]},"s":{"a":0,"k":[100,100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256.655,268,0]},"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":[100],"t":59},{"s":[0],"t":60}]}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-35.799,-108.024],[135.03,-108.024],[135.015,-107.976],[-35.905,-107.905]]}],"t":30},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-35.799,-108.024],[135.03,-108.024],[-48.36,108.024],[-135.03,96.72]]}],"t":36}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":30},{"s":[100],"t":31}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[245.351,170.024]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]},{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-146.335,21.917],[-146.203,22.157],[-111.091,-49.844],[-111.165,-49.681]]}],"t":36},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-146.335,21.917],[66.749,49.681],[146.335,-25.815],[-111.165,-49.681]]}],"t":42}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":36},{"s":[100],"t":37}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256.655,244.827]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]},{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[85.348,-127.61],[40.195,-131.89],[134.402,-123.098]]}],"t":36},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[54.848,-47.61],[40.195,-131.89],[134.402,-123.098]]}],"t":42},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-134.402,131.89],[40.195,-131.89],[134.402,-123.098]]}],"t":48}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":42},{"s":[100],"t":43}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[268.588,342.11]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]}],"ind":2},{"ty":4,"nm":"t","sr":1,"st":0,"op":30,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[256.655,268,0]},"s":{"a":0,"k":[100,100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256.655,268,0]},"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":[100],"t":29},{"s":[0],"t":30}]}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-35.799,-108.024],[135.03,-108.024],[135.015,-107.976],[-35.905,-107.905]]}],"t":0},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-35.799,-108.024],[135.03,-108.024],[-48.36,108.024],[-135.03,96.72]]}],"t":6}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":0},{"s":[100],"t":1}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[245.351,170.024]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]},{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-146.335,21.917],[-146.203,22.157],[-111.091,-49.844],[-111.165,-49.681]]}],"t":6},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-146.335,21.917],[66.749,49.681],[146.335,-25.815],[-111.165,-49.681]]}],"t":12}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":6},{"s":[100],"t":7}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[256.655,244.827]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]},{"ty":"gr","bm":0,"hd":false,"nm":"0","it":[{"ty":"sh","bm":0,"hd":false,"nm":"ã","d":1,"ks":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[85.348,-127.61],[40.195,-131.89],[134.402,-123.098]]}],"t":6},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[54.848,-47.61],[40.195,-131.89],[134.402,-123.098]]}],"t":12},{"s":[{"c":true,"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-134.402,131.89],[40.195,-131.89],[134.402,-123.098]]}],"t":18}]}},{"ty":"fl","bm":0,"hd":false,"nm":"å¡","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":12},{"s":[100],"t":13}]}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[268.588,342.11]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}}]}],"ind":3}],"v":"5.9.0","fr":30,"op":90,"ip":0,"assets":[]}
|
|
@@ -37,6 +37,9 @@ import KuposButton from "../../ui/KuposButton/KuposButton";
|
|
|
37
37
|
import BottomAmenities from "../../ui/BottomAmenities/BottomAmenities";
|
|
38
38
|
import SeatSection from "../../ui/SeatSection/SeatSection";
|
|
39
39
|
import DateTimeSection from "../../ui/DateTimeSection/DateTimeSection";
|
|
40
|
+
import FeatureServiceUi from "../../ui/FeatureServiceUI/FeatureServiceUi";
|
|
41
|
+
|
|
42
|
+
import thunderAnimation from "../../assets/images/anims/service_list/thunder_icon.json";
|
|
40
43
|
import ServiceBadges from "../../ui/ServiceBadges/ServiceBadges";
|
|
41
44
|
|
|
42
45
|
const SEAT_EXCEPTIONS = ["Asiento mascota"];
|
|
@@ -71,6 +74,9 @@ const ANIMATION_MAP: Record<string, Record<string, any>> = {
|
|
|
71
74
|
bombAnimation: {
|
|
72
75
|
kupos: bombAnimation,
|
|
73
76
|
},
|
|
77
|
+
thunderAnimation: {
|
|
78
|
+
kupos: thunderAnimation,
|
|
79
|
+
},
|
|
74
80
|
dotAnimation: {
|
|
75
81
|
kupos: dotAnimation,
|
|
76
82
|
},
|
|
@@ -113,6 +119,7 @@ function ServiceItemPB({
|
|
|
113
119
|
setIsExpand,
|
|
114
120
|
coachKey,
|
|
115
121
|
viewersConfig,
|
|
122
|
+
isNewUi,
|
|
116
123
|
showLoginModal,
|
|
117
124
|
isLoggedIn,
|
|
118
125
|
showLoginOption,
|
|
@@ -415,6 +422,18 @@ function ServiceItemPB({
|
|
|
415
422
|
siteType={siteType}
|
|
416
423
|
isAllinBus={isAllinBus}
|
|
417
424
|
/>
|
|
425
|
+
) : isNewUi ? (
|
|
426
|
+
<FeatureServiceUi
|
|
427
|
+
serviceItem={serviceItem}
|
|
428
|
+
showTopLabel={showTopLabel}
|
|
429
|
+
colors={colors}
|
|
430
|
+
isSoldOut={isSoldOut}
|
|
431
|
+
getAnimationIcon={getAnimationIcon}
|
|
432
|
+
cityOrigin={cityOrigin}
|
|
433
|
+
cityDestination={cityDestination}
|
|
434
|
+
renderIcon={renderIcon}
|
|
435
|
+
viewersConfig={viewersConfig}
|
|
436
|
+
/>
|
|
418
437
|
) : (
|
|
419
438
|
<div
|
|
420
439
|
className={`relative hover:z-[150] ${hasOfferText || hasDpEnabled ? "mb-[55px]" : "mb-[10px]"} ${
|
|
@@ -613,6 +632,7 @@ function ServiceItemPB({
|
|
|
613
632
|
isSoldOut={isSoldOut}
|
|
614
633
|
ladiesBookedSeats={serviceItem.ladies_booked_seats}
|
|
615
634
|
isDpEnabled={serviceItem.is_dp_enabled}
|
|
635
|
+
renderIcon={renderIcon}
|
|
616
636
|
/>
|
|
617
637
|
</div>
|
|
618
638
|
</div>
|
|
@@ -127,6 +127,7 @@ export interface MobileServiceItemProps {
|
|
|
127
127
|
directoIcon?: string;
|
|
128
128
|
whiteFireIcon?: string
|
|
129
129
|
femaleAnim?:string
|
|
130
|
+
cancelTicketIcon?: string;
|
|
130
131
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
131
132
|
};
|
|
132
133
|
useLottieFor?: string[];
|
|
@@ -132,6 +132,13 @@ export interface ServiceItemProps {
|
|
|
132
132
|
whiteFireIcon?: string
|
|
133
133
|
fireIcon?: string
|
|
134
134
|
|
|
135
|
+
whiteOrigin?: string,
|
|
136
|
+
whiteDestination?: string,
|
|
137
|
+
userIcon?: string,
|
|
138
|
+
sheildIcon?: string,
|
|
139
|
+
busIcon?: string,
|
|
140
|
+
whiteDownArrow?: string,
|
|
141
|
+
|
|
135
142
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
136
143
|
};
|
|
137
144
|
useLottieFor?: string[];
|
|
@@ -223,6 +230,7 @@ export interface ServiceItemProps {
|
|
|
223
230
|
label?: string; // e.g. "personas están viendo este viaje"
|
|
224
231
|
icon?: string; // optional icon URL
|
|
225
232
|
};
|
|
233
|
+
isNewUi?: boolean
|
|
226
234
|
showLoginModal?: any
|
|
227
235
|
isLoggedIn?: any
|
|
228
236
|
showLoginOption?: boolean
|
package/src/types.ts
CHANGED
|
@@ -115,6 +115,7 @@ export interface ServiceItemProps {
|
|
|
115
115
|
frazaIcon?: string;
|
|
116
116
|
specialDeparture?: string;
|
|
117
117
|
fireIcon?: string;
|
|
118
|
+
cancelTicketIcon?: string;
|
|
118
119
|
[key: string]: string | Record<string, string | undefined> | undefined;
|
|
119
120
|
};
|
|
120
121
|
useLottieFor?: string[];
|
|
@@ -15,6 +15,7 @@ interface ExpandedDropdownProps {
|
|
|
15
15
|
isSoldOut?: boolean;
|
|
16
16
|
ladiesBookedSeats?: string;
|
|
17
17
|
isDpEnabled?: boolean;
|
|
18
|
+
renderIcon?: any;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
function ExpandedDropdown({
|
|
@@ -26,6 +27,7 @@ function ExpandedDropdown({
|
|
|
26
27
|
isSoldOut,
|
|
27
28
|
ladiesBookedSeats,
|
|
28
29
|
isDpEnabled,
|
|
30
|
+
renderIcon,
|
|
29
31
|
}: ExpandedDropdownProps): React.ReactElement {
|
|
30
32
|
const hasPetInfo =
|
|
31
33
|
serviceItem.pet_seat_info &&
|
|
@@ -65,7 +67,14 @@ function ExpandedDropdown({
|
|
|
65
67
|
</div>
|
|
66
68
|
) : (
|
|
67
69
|
<div className="flex gap-[8px] text-[13.33px]">
|
|
68
|
-
<span style={{ marginTop: "2px" }}
|
|
70
|
+
<span style={{ marginTop: "2px" }}>
|
|
71
|
+
{" "}
|
|
72
|
+
<LottiePlayer
|
|
73
|
+
animationData={getAnimationIcon("flexibleIcon")}
|
|
74
|
+
width="20px"
|
|
75
|
+
height="20px"
|
|
76
|
+
/>
|
|
77
|
+
</span>
|
|
69
78
|
<span>
|
|
70
79
|
<span>
|
|
71
80
|
<span className="bold-text">Pasaje flexible:</span> Esta empresa
|
|
@@ -90,7 +99,7 @@ function ExpandedDropdown({
|
|
|
90
99
|
{ladiesBookedSeats &&
|
|
91
100
|
String(ladiesBookedSeats).trim() !== "" &&
|
|
92
101
|
isDpEnabled === true && (
|
|
93
|
-
<div className="flex gap-[6px]">
|
|
102
|
+
<div className="flex gap-[6px] items-center">
|
|
94
103
|
<span style={{ marginTop: "2px" }}>
|
|
95
104
|
{" "}
|
|
96
105
|
<LottiePlayer
|
|
@@ -107,7 +116,7 @@ function ExpandedDropdown({
|
|
|
107
116
|
)}
|
|
108
117
|
|
|
109
118
|
<div className="flex gap-[8px] text-[13.33px]">
|
|
110
|
-
<span
|
|
119
|
+
<span>{renderIcon("cancelTicketIcon", "14px")}</span>
|
|
111
120
|
<span>
|
|
112
121
|
<span className="bold-text">Políticas de anulación:</span> Tu pasaje
|
|
113
122
|
puede ser anulado de forma online
|
|
@@ -0,0 +1,549 @@
|
|
|
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 FeatureStepIcon = ({ icon }) => {
|
|
52
|
+
const iconClassName = "h-[30px] w-[30px] text-[#171717]";
|
|
53
|
+
|
|
54
|
+
switch (icon) {
|
|
55
|
+
case "flexible":
|
|
56
|
+
return (
|
|
57
|
+
<svg
|
|
58
|
+
className={iconClassName}
|
|
59
|
+
viewBox="0 0 40 40"
|
|
60
|
+
fill="none"
|
|
61
|
+
aria-hidden="true"
|
|
62
|
+
>
|
|
63
|
+
<path
|
|
64
|
+
d="M31.5 13.4A13 13 0 0 0 8 12.3"
|
|
65
|
+
stroke="currentColor"
|
|
66
|
+
strokeWidth="2.2"
|
|
67
|
+
strokeLinecap="round"
|
|
68
|
+
/>
|
|
69
|
+
<path
|
|
70
|
+
d="m7.4 7.7.2 5.2 5.1-1.2M8.5 26.6A13 13 0 0 0 32 27.7"
|
|
71
|
+
stroke="currentColor"
|
|
72
|
+
strokeWidth="2.2"
|
|
73
|
+
strokeLinecap="round"
|
|
74
|
+
strokeLinejoin="round"
|
|
75
|
+
/>
|
|
76
|
+
<path
|
|
77
|
+
d="m32.6 32.3-.2-5.2-5.1 1.2"
|
|
78
|
+
stroke="currentColor"
|
|
79
|
+
strokeWidth="2.2"
|
|
80
|
+
strokeLinecap="round"
|
|
81
|
+
strokeLinejoin="round"
|
|
82
|
+
/>
|
|
83
|
+
</svg>
|
|
84
|
+
);
|
|
85
|
+
case "bus":
|
|
86
|
+
return (
|
|
87
|
+
<svg
|
|
88
|
+
className={iconClassName}
|
|
89
|
+
viewBox="0 0 40 40"
|
|
90
|
+
fill="none"
|
|
91
|
+
aria-hidden="true"
|
|
92
|
+
>
|
|
93
|
+
<rect
|
|
94
|
+
x="8"
|
|
95
|
+
y="4.5"
|
|
96
|
+
width="24"
|
|
97
|
+
height="27"
|
|
98
|
+
rx="2.5"
|
|
99
|
+
stroke="currentColor"
|
|
100
|
+
strokeWidth="2.2"
|
|
101
|
+
/>
|
|
102
|
+
<path
|
|
103
|
+
d="M8 18.5h24M12 9h16M12 26h4m8 0h4M11 31.5v3h5v-3m8 0v3h5v-3M5.5 10v7m29-7v7"
|
|
104
|
+
stroke="currentColor"
|
|
105
|
+
strokeWidth="2.2"
|
|
106
|
+
strokeLinecap="round"
|
|
107
|
+
/>
|
|
108
|
+
</svg>
|
|
109
|
+
);
|
|
110
|
+
case "price":
|
|
111
|
+
return (
|
|
112
|
+
<svg
|
|
113
|
+
className={iconClassName}
|
|
114
|
+
viewBox="0 0 40 40"
|
|
115
|
+
fill="none"
|
|
116
|
+
aria-hidden="true"
|
|
117
|
+
>
|
|
118
|
+
<circle
|
|
119
|
+
cx="20"
|
|
120
|
+
cy="20"
|
|
121
|
+
r="14"
|
|
122
|
+
stroke="currentColor"
|
|
123
|
+
strokeWidth="2.2"
|
|
124
|
+
/>
|
|
125
|
+
<path
|
|
126
|
+
d="M23.7 15.4c-1-.7-2.2-1-3.6-1-2.2 0-3.8 1.1-3.8 2.8 0 4.2 7.4 1.8 7.4 5.8 0 1.8-1.6 2.8-4 2.8-1.5 0-2.9-.4-4-1.2M20 11.7v2.5m0 11.8v2.4"
|
|
127
|
+
stroke="currentColor"
|
|
128
|
+
strokeWidth="2.2"
|
|
129
|
+
strokeLinecap="round"
|
|
130
|
+
/>
|
|
131
|
+
</svg>
|
|
132
|
+
);
|
|
133
|
+
default:
|
|
134
|
+
return (
|
|
135
|
+
<svg
|
|
136
|
+
className={iconClassName}
|
|
137
|
+
viewBox="0 0 40 40"
|
|
138
|
+
fill="none"
|
|
139
|
+
aria-hidden="true"
|
|
140
|
+
>
|
|
141
|
+
<path
|
|
142
|
+
d="M7 11h26v6a3.5 3.5 0 0 0 0 7v6H7v-6a3.5 3.5 0 0 0 0-7v-6Z"
|
|
143
|
+
stroke="currentColor"
|
|
144
|
+
strokeWidth="2.2"
|
|
145
|
+
strokeLinejoin="round"
|
|
146
|
+
/>
|
|
147
|
+
<path
|
|
148
|
+
d="M22 12.5v3m0 3v3m0 3v4"
|
|
149
|
+
stroke="currentColor"
|
|
150
|
+
strokeWidth="2.2"
|
|
151
|
+
strokeLinecap="round"
|
|
152
|
+
/>
|
|
153
|
+
</svg>
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const AssuranceIcon = ({ type }) => {
|
|
159
|
+
const iconClassName = "h-[18px] w-[18px] shrink-0 text-white";
|
|
160
|
+
|
|
161
|
+
if (type === "pending") {
|
|
162
|
+
return (
|
|
163
|
+
<svg
|
|
164
|
+
className={iconClassName}
|
|
165
|
+
viewBox="0 0 20 20"
|
|
166
|
+
fill="none"
|
|
167
|
+
aria-hidden="true"
|
|
168
|
+
>
|
|
169
|
+
<path
|
|
170
|
+
d="M4.2 8.2a6.2 6.2 0 1 1 .5 5.1"
|
|
171
|
+
stroke="currentColor"
|
|
172
|
+
strokeWidth="1.8"
|
|
173
|
+
strokeLinecap="round"
|
|
174
|
+
/>
|
|
175
|
+
<path
|
|
176
|
+
d="M4.2 4.8v3.4h3.4"
|
|
177
|
+
stroke="currentColor"
|
|
178
|
+
strokeWidth="1.8"
|
|
179
|
+
strokeLinecap="round"
|
|
180
|
+
strokeLinejoin="round"
|
|
181
|
+
/>
|
|
182
|
+
</svg>
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return (
|
|
187
|
+
<svg
|
|
188
|
+
className={iconClassName}
|
|
189
|
+
viewBox="0 0 20 20"
|
|
190
|
+
fill="none"
|
|
191
|
+
aria-hidden="true"
|
|
192
|
+
>
|
|
193
|
+
<path
|
|
194
|
+
d="M10 2.2 16.3 4v5c0 4-2.4 6.8-6.3 8.7C6.1 15.8 3.7 13 3.7 9V4L10 2.2Z"
|
|
195
|
+
stroke="currentColor"
|
|
196
|
+
strokeWidth="1.6"
|
|
197
|
+
strokeLinejoin="round"
|
|
198
|
+
/>
|
|
199
|
+
<path
|
|
200
|
+
d="m6.9 9.7 2.1 2.1 4.3-4.4"
|
|
201
|
+
stroke="currentColor"
|
|
202
|
+
strokeWidth="1.7"
|
|
203
|
+
strokeLinecap="round"
|
|
204
|
+
strokeLinejoin="round"
|
|
205
|
+
/>
|
|
206
|
+
</svg>
|
|
207
|
+
);
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
const FeatureServiceUi = ({
|
|
211
|
+
serviceItem,
|
|
212
|
+
showTopLabel,
|
|
213
|
+
colors,
|
|
214
|
+
isSoldOut,
|
|
215
|
+
getAnimationIcon,
|
|
216
|
+
cityOrigin,
|
|
217
|
+
cityDestination,
|
|
218
|
+
renderIcon,
|
|
219
|
+
viewersConfig,
|
|
220
|
+
}) => {
|
|
221
|
+
const operators =
|
|
222
|
+
serviceItem?.operators?.length > 0
|
|
223
|
+
? serviceItem.operators
|
|
224
|
+
: HARDCODED_OPERATORS;
|
|
225
|
+
|
|
226
|
+
return (
|
|
227
|
+
<div
|
|
228
|
+
// ${
|
|
229
|
+
// serviceItem.offer_text ? "mb-[55px]" : "mb-[10px]"
|
|
230
|
+
// }
|
|
231
|
+
className={`relative mb-[10px]
|
|
232
|
+
${
|
|
233
|
+
serviceItem?.is_direct_trip ||
|
|
234
|
+
serviceItem?.train_type_label === "Tren Express (Nuevo)" ||
|
|
235
|
+
showTopLabel
|
|
236
|
+
? "mt-[24px]"
|
|
237
|
+
: "mt-[20px]"
|
|
238
|
+
}`}
|
|
239
|
+
>
|
|
240
|
+
<div
|
|
241
|
+
className=""
|
|
242
|
+
style={{
|
|
243
|
+
border: "1px solid #c0c0c0",
|
|
244
|
+
padding: "14px",
|
|
245
|
+
borderRadius: "14px",
|
|
246
|
+
}}
|
|
247
|
+
>
|
|
248
|
+
<div className="flex justify-between items-center px-[14px] pb-[10px] text-[13.33px]">
|
|
249
|
+
<div className="flex items-center gap-[10px]">
|
|
250
|
+
<span>Salida flexible</span>
|
|
251
|
+
<div
|
|
252
|
+
className="bold-text font-[9px]"
|
|
253
|
+
style={{
|
|
254
|
+
backgroundColor: "#FF5C60",
|
|
255
|
+
padding: "1px 8px",
|
|
256
|
+
borderRadius: "4px",
|
|
257
|
+
color: "#fff",
|
|
258
|
+
}}
|
|
259
|
+
>
|
|
260
|
+
<span>AHORRAS 60%</span>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
<div>
|
|
264
|
+
<span>
|
|
265
|
+
{renderIcon("fireIcon", "14px")}{" "}
|
|
266
|
+
<span className="bold-text">Remate</span> términa en{" "}
|
|
267
|
+
<span
|
|
268
|
+
className="bold-text text-end"
|
|
269
|
+
ref={(node) => commonService.startCountdown(node, 599)}
|
|
270
|
+
style={{
|
|
271
|
+
fontVariantNumeric: "tabular-nums",
|
|
272
|
+
display: "inline-block",
|
|
273
|
+
color: "#FF5C60",
|
|
274
|
+
}}
|
|
275
|
+
/>
|
|
276
|
+
</span>
|
|
277
|
+
</div>
|
|
278
|
+
</div>
|
|
279
|
+
<div
|
|
280
|
+
id={`service-card-${serviceItem.id}`}
|
|
281
|
+
className="bg-[#0C1421] text-white mx-auto relative rounded-[14px] p-[14px] text-[13.33px]"
|
|
282
|
+
>
|
|
283
|
+
<div className="grid grid-cols-[1.3fr_2fr_1.2fr] gap-[16px] items-stretch">
|
|
284
|
+
{/* LEFT: origin, destination, flexible, time, confirmed seat */}
|
|
285
|
+
<div className="flex flex-col justify-between gap-[20px] py-[2px] ">
|
|
286
|
+
<div className="flex flex-col gap-[8px]">
|
|
287
|
+
<div className="flex items-center gap-[8px]">
|
|
288
|
+
<img
|
|
289
|
+
src={serviceItem.icons?.whiteOrigin}
|
|
290
|
+
alt="origin"
|
|
291
|
+
className={`w-[14px] h-[14px] shrink-0 ${
|
|
292
|
+
isSoldOut ? "grayscale" : ""
|
|
293
|
+
}`}
|
|
294
|
+
/>
|
|
295
|
+
<span className="text-[13px] bold-text">
|
|
296
|
+
{cityOrigin?.label.split(",")[0]}
|
|
297
|
+
</span>
|
|
298
|
+
</div>
|
|
299
|
+
<div className="flex items-center gap-[8px]">
|
|
300
|
+
<img
|
|
301
|
+
src={serviceItem.icons?.whiteDestination}
|
|
302
|
+
alt="destination"
|
|
303
|
+
className={`w-[16px] h-[16px] shrink-0 ${
|
|
304
|
+
isSoldOut ? "grayscale" : ""
|
|
305
|
+
}`}
|
|
306
|
+
style={{ opacity: isSoldOut ? 0.5 : 1 }}
|
|
307
|
+
/>
|
|
308
|
+
<span className="text-[13px] bold-text">
|
|
309
|
+
{cityDestination?.label.split(",")[0]}
|
|
310
|
+
</span>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
|
|
314
|
+
<div className="flex flex-col gap-[8px]">
|
|
315
|
+
{/* Salida flexible badge — uses flexibleIcon */}
|
|
316
|
+
{/* <div
|
|
317
|
+
className="flex items-center gap-[6px] rounded-[8px] px-[8px] py-[4px] w-fit mb-[6px]"
|
|
318
|
+
style={{
|
|
319
|
+
border: "1px solid #363c48",
|
|
320
|
+
backgroundColor: "#1a202e",
|
|
321
|
+
}}
|
|
322
|
+
>
|
|
323
|
+
<img
|
|
324
|
+
src={serviceItem.icons?.busIcon}
|
|
325
|
+
alt="bus"
|
|
326
|
+
style={{ width: "20px", height: "20px" }}
|
|
327
|
+
/>
|
|
328
|
+
<span className="text-[12px] whitespace-nowrap">
|
|
329
|
+
Salida flexible
|
|
330
|
+
</span>
|
|
331
|
+
</div> */}
|
|
332
|
+
<div className="text-[12px] bold-text whitespace-nowrap">
|
|
333
|
+
Entre 07:00 AM y 10:00 AM
|
|
334
|
+
</div>
|
|
335
|
+
<div className="text-[11px] bold-text">Viernes 23 de mayo</div>
|
|
336
|
+
</div>
|
|
337
|
+
|
|
338
|
+
<div className="flex flex-col items-start gap-[10px] text-[12px] ">
|
|
339
|
+
<div className="flex items-center gap-[8px]">
|
|
340
|
+
<AssuranceIcon type="pending" />
|
|
341
|
+
|
|
342
|
+
<span
|
|
343
|
+
className="text-[10px]"
|
|
344
|
+
style={{
|
|
345
|
+
lineHeight: 1.3,
|
|
346
|
+
}}
|
|
347
|
+
>
|
|
348
|
+
Empresa y hora a confirmar luego del pago.
|
|
349
|
+
</span>
|
|
350
|
+
</div>
|
|
351
|
+
<div className="flex items-center gap-[8px]">
|
|
352
|
+
<AssuranceIcon type="secured" />
|
|
353
|
+
|
|
354
|
+
<span
|
|
355
|
+
className="text-[10px]"
|
|
356
|
+
style={{
|
|
357
|
+
lineHeight: 1.3,
|
|
358
|
+
}}
|
|
359
|
+
>
|
|
360
|
+
Tu compra está 100% asegurada.
|
|
361
|
+
</span>
|
|
362
|
+
</div>
|
|
363
|
+
</div>
|
|
364
|
+
</div>
|
|
365
|
+
|
|
366
|
+
{/* MIDDLE: competing operators + viewers */}
|
|
367
|
+
<div className="px-[16px] flex flex-col items-center justify-between gap-[12px] py-[2px] border-r border-[#363c48] border-l border-[#363c48]">
|
|
368
|
+
<div className="text-center">
|
|
369
|
+
<div className="bold-text text-[14px]">
|
|
370
|
+
3 operadores compitiendo por tu compra
|
|
371
|
+
</div>
|
|
372
|
+
{/* <div className="text-[12px] mt-[8px]">
|
|
373
|
+
Empresa a confirmar después de tu pago
|
|
374
|
+
</div> */}
|
|
375
|
+
</div>
|
|
376
|
+
|
|
377
|
+
<div className="flex items-stretch justify-center gap-[8px] w-full mb-[16px]">
|
|
378
|
+
{operators.map((op, idx) => (
|
|
379
|
+
<div
|
|
380
|
+
key={idx}
|
|
381
|
+
className="flex flex-col items-center justify-center gap-[8px] rounded-[8px]"
|
|
382
|
+
style={{
|
|
383
|
+
width: "140px",
|
|
384
|
+
// height: "80px",
|
|
385
|
+
border: "1px solid #363c48",
|
|
386
|
+
backgroundColor: "#1a202e",
|
|
387
|
+
padding: "14px",
|
|
388
|
+
}}
|
|
389
|
+
>
|
|
390
|
+
<img
|
|
391
|
+
src={serviceItem.operator_details[0]}
|
|
392
|
+
alt={op.name}
|
|
393
|
+
className={`h-[24px] w-auto object-contain ${
|
|
394
|
+
isSoldOut ? "grayscale" : ""
|
|
395
|
+
}`}
|
|
396
|
+
/>
|
|
397
|
+
<span className="text-[11px] truncate max-w-full text-center">
|
|
398
|
+
{serviceItem.operator_details[2]}
|
|
399
|
+
</span>
|
|
400
|
+
<div className="bg-[#FF8F45] text-white text-[12px] font-bold px-[16px] py-[4px] rounded-[4px] bold-text">
|
|
401
|
+
<span>{op?.time}</span>
|
|
402
|
+
</div>
|
|
403
|
+
<span className="text-[10px] mt-[6px]">
|
|
404
|
+
{op?.seatsAvailable}
|
|
405
|
+
</span>
|
|
406
|
+
</div>
|
|
407
|
+
))}
|
|
408
|
+
</div>
|
|
409
|
+
|
|
410
|
+
<div
|
|
411
|
+
className="flex items-center justify-center gap-[6px] text-[12px]"
|
|
412
|
+
style={{
|
|
413
|
+
border: "1px solid #363c48",
|
|
414
|
+
backgroundColor: "#1a202e",
|
|
415
|
+
padding: "8px 14px",
|
|
416
|
+
borderRadius: "24px",
|
|
417
|
+
width: "430px",
|
|
418
|
+
}}
|
|
419
|
+
>
|
|
420
|
+
<img
|
|
421
|
+
src={serviceItem.icons?.userIcon}
|
|
422
|
+
alt="eye"
|
|
423
|
+
style={{ width: "16px", height: "16px" }}
|
|
424
|
+
/>
|
|
425
|
+
<span>
|
|
426
|
+
<span className="bold-text text-white">
|
|
427
|
+
{" "}
|
|
428
|
+
<span
|
|
429
|
+
className="bold-text"
|
|
430
|
+
ref={(node) =>
|
|
431
|
+
commonService.startViewerCount(node, viewersConfig)
|
|
432
|
+
}
|
|
433
|
+
style={{
|
|
434
|
+
fontVariantNumeric: "tabular-nums",
|
|
435
|
+
color: "#FF5C60",
|
|
436
|
+
}}
|
|
437
|
+
/>{" "}
|
|
438
|
+
<span
|
|
439
|
+
style={{
|
|
440
|
+
color: "#FF5C60",
|
|
441
|
+
}}
|
|
442
|
+
>
|
|
443
|
+
personas
|
|
444
|
+
</span>
|
|
445
|
+
</span>{" "}
|
|
446
|
+
viendo este viaje |{" "}
|
|
447
|
+
<span
|
|
448
|
+
className="bold-text"
|
|
449
|
+
ref={(node) =>
|
|
450
|
+
commonService.startComprandoCount(node, 4, 16)
|
|
451
|
+
}
|
|
452
|
+
style={{ fontVariantNumeric: "tabular-nums" }}
|
|
453
|
+
/>{" "}
|
|
454
|
+
han comprado
|
|
455
|
+
</span>
|
|
456
|
+
</div>
|
|
457
|
+
</div>
|
|
458
|
+
|
|
459
|
+
{/* RIGHT: price + button */}
|
|
460
|
+
<div className="flex flex-col justify-center gap-[12px] py-[2px] relative mb-[16px]">
|
|
461
|
+
<div
|
|
462
|
+
className="flex flex-col gap-[6px] "
|
|
463
|
+
style={{
|
|
464
|
+
alignItems: "center",
|
|
465
|
+
}}
|
|
466
|
+
>
|
|
467
|
+
<span className="text-[#FF8F45] bold-text text-[26px] leading-tight">
|
|
468
|
+
60% OFF
|
|
469
|
+
</span>
|
|
470
|
+
<span className="text-[#666] text-[14px] line-through">
|
|
471
|
+
$10.000
|
|
472
|
+
</span>
|
|
473
|
+
<span className="text-white bold-text text-[28px] leading-none">
|
|
474
|
+
$4.000
|
|
475
|
+
</span>
|
|
476
|
+
</div>
|
|
477
|
+
|
|
478
|
+
<button
|
|
479
|
+
className="flex items-center gap-[6px] px-[20px] py-[10px] rounded-[12px] text-white bold-text text-[13px] mt-[4px] justify-center border-none cursor-pointer"
|
|
480
|
+
style={{
|
|
481
|
+
backgroundColor: "#FF5C60",
|
|
482
|
+
}}
|
|
483
|
+
>
|
|
484
|
+
<LottiePlayer
|
|
485
|
+
// animationData={serviceItem.icons.flexibleAnim}
|
|
486
|
+
animationData={getAnimationIcon("thunderAnimation")}
|
|
487
|
+
width="18px"
|
|
488
|
+
height="18px"
|
|
489
|
+
/>
|
|
490
|
+
<span className="whitespace-nowrap">¡Lo quiero!</span>
|
|
491
|
+
</button>
|
|
492
|
+
</div>
|
|
493
|
+
|
|
494
|
+
<div className="absolute bottom-[11px] right-[18px]">
|
|
495
|
+
<img
|
|
496
|
+
src={serviceItem.icons?.downArrow}
|
|
497
|
+
alt="down arrow"
|
|
498
|
+
style={{
|
|
499
|
+
width: "14px",
|
|
500
|
+
height: "8px",
|
|
501
|
+
filter: "brightness(0) invert(1)",
|
|
502
|
+
}}
|
|
503
|
+
/>
|
|
504
|
+
</div>
|
|
505
|
+
</div>
|
|
506
|
+
</div>
|
|
507
|
+
<div className="px-[16px] pt-[14px] pb-[6px] text-[13.33px]">
|
|
508
|
+
<span className="bold-text">¿Cómo funciona?</span>
|
|
509
|
+
|
|
510
|
+
<div className="mt-[14px] grid grid-cols-4 gap-[20px] px-[16px] ">
|
|
511
|
+
{HOW_IT_WORKS_STEPS.map((step) => (
|
|
512
|
+
<div
|
|
513
|
+
key={step.name}
|
|
514
|
+
className="flex flex-col items-center text-center text-[#272727]"
|
|
515
|
+
>
|
|
516
|
+
<FeatureStepIcon icon={step.icon} />
|
|
517
|
+
<span className="bold-text mt-[10px] text-[12px] leading-[14px]">
|
|
518
|
+
{step.name}
|
|
519
|
+
</span>
|
|
520
|
+
<span className="mt-[2px] max-w-[220px] text-[12px] leading-[14px] text-[#4a4a4a]">
|
|
521
|
+
{step.text}
|
|
522
|
+
</span>
|
|
523
|
+
</div>
|
|
524
|
+
))}
|
|
525
|
+
</div>
|
|
526
|
+
</div>
|
|
527
|
+
</div>
|
|
528
|
+
|
|
529
|
+
{/* TOP BADGE — "Remate | Termina en 09:55 min" hardcoded, no countdown hook */}
|
|
530
|
+
{/* {showTopLabel && (
|
|
531
|
+
<div className="absolute -top-[11px] left-0 w-full flex items-center justify-end gap-[12px] pr-[15px] z-10 ">
|
|
532
|
+
<div className="flex items-center gap-[6px] py-[5px] px-[14px] rounded-[38px] text-[12.5px] bg-[#FF8F45] text-white whitespace-nowrap">
|
|
533
|
+
<LottiePlayer
|
|
534
|
+
animationData={getAnimationIcon("bombAnimation")}
|
|
535
|
+
width="14px"
|
|
536
|
+
height="14px"
|
|
537
|
+
/>
|
|
538
|
+
<span>
|
|
539
|
+
<strong>Remate</strong> | Termina en{" "}
|
|
540
|
+
<strong>{HARDCODED_COUNTDOWN}</strong> min
|
|
541
|
+
</span>
|
|
542
|
+
</div>
|
|
543
|
+
</div>
|
|
544
|
+
)} */}
|
|
545
|
+
</div>
|
|
546
|
+
);
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
export default FeatureServiceUi;
|
|
@@ -17,6 +17,7 @@ interface ExpandedDropdownMobileProps {
|
|
|
17
17
|
isDpEnabled?: boolean;
|
|
18
18
|
femaleAnim?: any;
|
|
19
19
|
flexibleAnim?: any;
|
|
20
|
+
renderIcon?: any;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
function ExpandedDropdownMobile({
|
|
@@ -30,6 +31,7 @@ function ExpandedDropdownMobile({
|
|
|
30
31
|
isDpEnabled,
|
|
31
32
|
femaleAnim,
|
|
32
33
|
flexibleAnim,
|
|
34
|
+
renderIcon,
|
|
33
35
|
}: ExpandedDropdownMobileProps): React.ReactElement {
|
|
34
36
|
return (
|
|
35
37
|
<div
|
|
@@ -46,7 +48,16 @@ function ExpandedDropdownMobile({
|
|
|
46
48
|
>
|
|
47
49
|
{isPeru ? null : isChangeTicket ? (
|
|
48
50
|
<div className="flex gap-[6px]">
|
|
49
|
-
<span style={{ marginTop: "2px" }}
|
|
51
|
+
<span style={{ marginTop: "2px" }}>
|
|
52
|
+
{" "}
|
|
53
|
+
<div>
|
|
54
|
+
<LottiePlayer
|
|
55
|
+
animationData={flexibleAnim}
|
|
56
|
+
width="16px"
|
|
57
|
+
height="16px"
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
</span>
|
|
50
61
|
<span>
|
|
51
62
|
<span className="bold-text">Pasaje flexible:</span> Tu pasaje
|
|
52
63
|
puede ser cambiado de manera online{" "}
|
|
@@ -125,7 +136,7 @@ function ExpandedDropdownMobile({
|
|
|
125
136
|
</div>
|
|
126
137
|
) : null}
|
|
127
138
|
<div className="flex gap-[6px]">
|
|
128
|
-
<span
|
|
139
|
+
<span>{renderIcon("cancelTicketIcon", "14px")}</span>
|
|
129
140
|
<span>
|
|
130
141
|
<span className="bold-text">Políticas de anulación:</span> Tu pasaje
|
|
131
142
|
puede ser anulado de forma online
|