kupos-ui-components-lib 9.6.10 → 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.
@@ -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,
@@ -414,12 +421,18 @@ function ServiceItemPB({
414
421
  isPeru={isPeru}
415
422
  siteType={siteType}
416
423
  isAllinBus={isAllinBus}
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}
417
435
  viewersConfig={viewersConfig}
418
- isLoggedIn={isLoggedIn}
419
- showLoginModal={showLoginModal}
420
- isExpand={isExpand}
421
- setIsExpand={setIsExpand}
422
- coachKey={coachKey}
423
436
  />
424
437
  ) : (
425
438
  <div
@@ -619,6 +632,7 @@ function ServiceItemPB({
619
632
  isSoldOut={isSoldOut}
620
633
  ladiesBookedSeats={serviceItem.ladies_booked_seats}
621
634
  isDpEnabled={serviceItem.is_dp_enabled}
635
+ renderIcon={renderIcon}
622
636
  />
623
637
  </div>
624
638
  </div>
@@ -458,6 +458,7 @@ function ServiceItemMobile({
458
458
  isDpEnabled={serviceItem.is_dp_enabled}
459
459
  femaleAnim={serviceItem.icons.femaleAnim}
460
460
  flexibleAnim={serviceItem.icons.flexibleAnim}
461
+ renderIcon={renderIcon}
461
462
  />
462
463
  </div>
463
464
  </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" }}>•</span>
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 style={{ marginTop: "2px" }}>•</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