kupos-ui-components-lib 9.7.1 → 9.7.3

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.
@@ -0,0 +1 @@
1
+ {"nm":"Main Scene","ddd":0,"h":512,"w":512,"meta":{"g":"@lottiefiles/creator@1.90.1"},"layers":[{"ty":2,"nm":"111","sr":1,"st":0,"op":150,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[54.49996512276783,38.99999128069197]},"s":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[436.62,436.62],"t":0},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[300,300],"t":58},{"s":[436.62,436.62],"t":112}]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[255.99996512276783,255.99999128069197]},"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":0},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[70],"t":58},{"s":[100],"t":112}]}},"refId":"111_b9bb56d2-8f3c-4772-b1ac-9caf81e5c707","ind":1}],"v":"5.7.0","fr":30,"op":114,"ip":0,"assets":[{"id":"111_b9bb56d2-8f3c-4772-b1ac-9caf81e5c707","e":1,"w":109,"h":78,"p":"data:image/png;base64,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","u":""}]}
@@ -23,6 +23,7 @@ import bombAnimation from "../../assets/images/anims/service_list/bomb.json";
23
23
  import dotAnimation from "../../assets/images/anims/service_list/dot_animation.json";
24
24
  import starAnimation from "../../assets/images/anims/service_list/star_anim.json";
25
25
  import femaleAnimation from "../../assets/images/anims/service_list/female_anim.json";
26
+ import usersAnimation from "../../assets/images/anims/service_list/users_anim.json";
26
27
  import RatingBlock from "../../ui/RatingBlock";
27
28
  import DurationBlock from "../../ui/DurationBlock";
28
29
  import PetBlock from "../../ui/PetBlock";
@@ -78,6 +79,9 @@ const ANIMATION_MAP = {
78
79
  femaaleAnimation: {
79
80
  kupos: femaleAnimation,
80
81
  },
82
+ usersAnimation: {
83
+ kupos: usersAnimation,
84
+ },
81
85
  };
82
86
  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, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, }) {
83
87
  var _a;
@@ -248,7 +252,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
248
252
  },
249
253
  ];
250
254
  const otherItems = items.filter((i) => i.key !== "pet" && i.key !== "flexible" && !!i.condition);
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, isFeatureDropDownExpand: isFeatureDropDownExpand, ticketQuantity: ticketQuantity, onIncreaseTicketQuantity: onIncreaseTicketQuantity, onDecreaseTicketQuantity: onDecreaseTicketQuantity, onBookButtonPress: onBookButtonPress, onToggleExpand: () => setIsFeatureDropDownExpand &&
255
+ 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, isSoldOut: isSoldOut, getAnimationIcon: getAnimationIcon, cityOrigin: cityOrigin, cityDestination: cityDestination, renderIcon: renderIcon, viewersConfig: viewersConfig, isFeatureDropDownExpand: isFeatureDropDownExpand, ticketQuantity: ticketQuantity, onIncreaseTicketQuantity: onIncreaseTicketQuantity, onDecreaseTicketQuantity: onDecreaseTicketQuantity, onBookButtonPress: onBookButtonPress, onToggleExpand: () => setIsFeatureDropDownExpand &&
252
256
  setIsFeatureDropDownExpand(isFeatureDropDownExpand === serviceItem.id ||
253
257
  isFeatureDropDownExpand === true
254
258
  ? null
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { MobileServiceItemProps } from "./mobileTypes";
3
- declare function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, }: MobileServiceItemProps): React.ReactElement;
3
+ declare function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUi, }: MobileServiceItemProps): React.ReactElement;
4
4
  export default ServiceItemMobile;
@@ -5,6 +5,7 @@ import BottomAmenitiesMobile from "../../ui/mobileweb/BottomAmenitiesMobile";
5
5
  import DateTimeSectionMobile from "../../ui/mobileweb/DateTimeSectionMobile";
6
6
  import ExpandedDropdownMobile from "../../ui/mobileweb/ExpandedDropdownMobile";
7
7
  import ServiceBadgesMobile from "../../ui/mobileweb/ServiceBadgesMobile";
8
+ import FeatureServiceUiMobile from "../../ui/FeaturServiceUiMobile/FeatureServiceUiMobile";
8
9
  const SEAT_EXCEPTIONS = ["Asiento mascota"];
9
10
  const exceptions = [
10
11
  "gy",
@@ -17,7 +18,7 @@ const exceptions = [
17
18
  "blanco",
18
19
  "asiento_mascota",
19
20
  ];
20
- function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, }) {
21
+ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUi, }) {
21
22
  var _a, _b, _c, _d, _e, _f, _g;
22
23
  const isItemExpanded = serviceItem.id === isExpanded;
23
24
  const isPetSeat = (Object.keys(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.pet_seat_info) || []).length > 0;
@@ -87,7 +88,11 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
87
88
  if (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_transpordo) {
88
89
  isConexion = true;
89
90
  }
90
- return (React.createElement("div", { className: `relative ${!serviceItem.offer_text || !(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) ? "mb-[14px]" : showTopLabel || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ? "mb-[20px]" : "mb-[12px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
91
+ return (React.createElement(React.Fragment, null, isNewUi ? (React.createElement(FeatureServiceUiMobile, { serviceItem: serviceItem, showTopLabel: showTopLabel, colors: colors, isSoldOut: isSoldOut, cityOrigin: cityOrigin, cityDestination: cityDestination, renderIcon: renderIcon, viewersConfig: viewersConfig, isFeatureDropDownExpand: isFeatureDropDownExpand, ticketQuantity: ticketQuantity, onIncreaseTicketQuantity: onIncreaseTicketQuantity, onDecreaseTicketQuantity: onDecreaseTicketQuantity, onBookButtonPress: onBookButtonPress, onToggleExpand: () => setIsFeatureDropDownExpand &&
92
+ setIsFeatureDropDownExpand(isFeatureDropDownExpand === serviceItem.id ||
93
+ isFeatureDropDownExpand === true
94
+ ? null
95
+ : serviceItem.id) })) : (React.createElement("div", { className: `relative ${!serviceItem.offer_text || !(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) ? "mb-[14px]" : showTopLabel || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ? "mb-[20px]" : "mb-[12px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
91
96
  isConexion ||
92
97
  (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
93
98
  showTopLabel
@@ -108,7 +113,9 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
108
113
  React.createElement("div", { className: "flex items-center" },
109
114
  React.createElement("img", { src: serviceItem.icons.rating, alt: "origin", className: `w-[12px] h-[12px] mr-[4px] object-contain ${isSoldOut ? "grayscale" : ""}` }),
110
115
  React.createElement("span", { style: { lineHeight: "normal" } }, getServiceStars(serviceItem))),
111
- React.createElement("div", { className: "flex items-center cursor-pointer ", style: { color: isSoldOut ? "#bbb" : "text-[#464647]" } },
116
+ React.createElement("div", { className: "flex items-center cursor-pointer ", style: {
117
+ color: isSoldOut ? "#bbb" : "text-[#464647]",
118
+ } },
112
119
  React.createElement("span", { className: "ml-[3px] min-[420]:text-[13px] text-[12px] text-ellipsis overflow-hidden whitespace-nowrap max-w-[120px]" }, serviceItem.operator_details[2]))))) : null)),
113
120
  React.createElement(DateTimeSectionMobile, { onBookButtonPress: onBookButtonPress, isCiva: isCiva, isSoldOut: isSoldOut, isLinatal: isLinatal, isPeru: isPeru, orignLabel: orignLabel, destinationLabel: destinationLabel, originIcon: (_c = serviceItem.icons) === null || _c === void 0 ? void 0 : _c.origin, destinationIcon: (_d = serviceItem.icons) === null || _d === void 0 ? void 0 : _d.destination, travelDate: serviceItem.travel_date, arrivalDate: serviceItem.arrival_date, depTime: serviceItem.dep_time, arrTime: serviceItem.arr_time, seatTypes: serviceItem.seat_types, seatPriceColor: colors.seatPriceColor, tooltipBgColor: colors.tooltipBgColor, currencySign: currencySign, availableSeats: serviceItem.available_seats, removeDuplicateSeats: removeDuplicateSeats, serviceItem: serviceItem, showLastSeats: showLastSeats, discountSeatPriceColor: colors.discountSeatPriceColor }),
114
121
  hasDiscount && (React.createElement("div", { className: "flex justify-end" }, isSoldOut ? (React.createElement("span", { className: "col-span-2 min-[420]:text-[13px] text-right text-[12px] text-[#ccc]" }, "Agotado")) : null)),
@@ -123,7 +130,9 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
123
130
  React.createElement(ServiceBadgesMobile, { showTopLabel: showTopLabel, isSoldOut: isSoldOut, colors: colors, renderIcon: renderIcon, serviceItem: serviceItem, isConexion: isConexion })),
124
131
  ((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)) &&
125
132
  !isSoldOut && (React.createElement("div", { className: "px-[12px] pt-[22px] pb-[8px] relative -z-9 -mt-[15px]", style: {
126
- background: isSoldOut ? offerGradientWithOpacity : offerGradient,
133
+ background: isSoldOut
134
+ ? offerGradientWithOpacity
135
+ : offerGradient,
127
136
  // opacity: isSoldOut ? 0.5 : 1,
128
137
  borderRadius: "0 0 14px 14px",
129
138
  zIndex: -1,
@@ -131,8 +140,8 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
131
140
  React.createElement("div", { className: "flex flex-col gap-[8px] text-[12px] min-[420px]:text-[12px] text-[#464647]", style: { lineHeight: 1.6 } },
132
141
  React.createElement("div", { className: "flex justify-between items-center" },
133
142
  (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) &&
134
- Object.keys((_f = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discount_percents) !== null && _f !== void 0 ? _f : {}).length ===
135
- 0 &&
143
+ Object.keys((_f = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discount_percents) !== null && _f !== void 0 ? _f : {})
144
+ .length === 0 &&
136
145
  ((_g = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discounted_seats) !== null && _g !== void 0 ? _g : []).length === 0 ? (React.createElement("div", { className: "flex items-center gap-[6px]" },
137
146
  React.createElement(LottiePlayer, { animationData: serviceItem.icons.starAnimation, width: "14px", height: "14px" }),
138
147
  React.createElement("span", { className: "text-[#fff]" }, "M\u00E1s elegido"))) : (React.createElement("div", { className: `flex ${((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || "").length > 10 ? "items-start" : "items-center"}` },
@@ -180,6 +189,6 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
180
189
  zIndex: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ? -3 : undefined,
181
190
  marginTop: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ? "-15px" : "-10px",
182
191
  } },
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 })))));
192
+ 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
193
  }
185
194
  export default ServiceItemMobile;
@@ -125,6 +125,19 @@ export interface MobileServiceItemProps {
125
125
  whiteFireIcon?: string;
126
126
  femaleAnim?: string;
127
127
  cancelTicketIcon?: string;
128
+ thunderAnim?: string;
129
+ personsAnim?: string;
130
+ whiteOrigin?: string;
131
+ whiteDestination?: string;
132
+ userIcon?: string;
133
+ sheildIcon?: string;
134
+ busIcon?: string;
135
+ whiteDownArrow?: string;
136
+ empressaIcon?: string;
137
+ flexibleIcon?: string;
138
+ listoIcon?: string;
139
+ precioIcon?: string;
140
+ confirmarIcon?: string;
128
141
  [key: string]: string | Record<string, string | undefined> | undefined;
129
142
  };
130
143
  useLottieFor?: string[];
@@ -184,4 +197,18 @@ export interface MobileServiceItemProps {
184
197
  label?: string;
185
198
  icon?: string;
186
199
  };
200
+ isFeatureDropDownExpand?: any;
201
+ setIsFeatureDropDownExpand?: (value: any) => void;
202
+ ticketQuantity?: number;
203
+ onIncreaseTicketQuantity?: (serviceItem: MobileServiceItemProps["serviceItem"]) => void;
204
+ onDecreaseTicketQuantity?: (serviceItem: MobileServiceItemProps["serviceItem"]) => void;
205
+ cityOrigin?: {
206
+ value: number;
207
+ label: string;
208
+ };
209
+ cityDestination?: {
210
+ value: number;
211
+ label: string;
212
+ };
213
+ isNewUi?: boolean;
187
214
  }
@@ -135,6 +135,11 @@ export interface ServiceItemProps {
135
135
  sheildIcon?: string;
136
136
  busIcon?: string;
137
137
  whiteDownArrow?: string;
138
+ empressaIcon?: string;
139
+ flexibleIcon?: string;
140
+ listoIcon?: string;
141
+ precioIcon?: string;
142
+ confirmarIcon?: string;
138
143
  [key: string]: string | Record<string, string | undefined> | undefined;
139
144
  };
140
145
  useLottieFor?: string[];
package/dist/styles.css CHANGED
@@ -174,9 +174,18 @@
174
174
  .m-\[auto\] {
175
175
  margin: auto;
176
176
  }
177
+ .mx-\[6px\] {
178
+ margin-inline: 6px;
179
+ }
180
+ .mx-\[10px\] {
181
+ margin-inline: 10px;
182
+ }
177
183
  .mx-auto {
178
184
  margin-inline: auto;
179
185
  }
186
+ .my-\[8px\] {
187
+ margin-block: 8px;
188
+ }
180
189
  .my-\[14px\] {
181
190
  margin-block: 14px;
182
191
  }
@@ -207,6 +216,9 @@
207
216
  .mt-\[10px\] {
208
217
  margin-top: 10px;
209
218
  }
219
+ .mt-\[12px\] {
220
+ margin-top: 12px;
221
+ }
210
222
  .mt-\[13px\] {
211
223
  margin-top: 13px;
212
224
  }
@@ -396,9 +408,6 @@
396
408
  .w-\[20px\] {
397
409
  width: 20px;
398
410
  }
399
- .w-\[30px\] {
400
- width: 30px;
401
- }
402
411
  .w-\[34px\] {
403
412
  width: 34px;
404
413
  }
@@ -987,6 +996,9 @@
987
996
  .text-\[14px\] {
988
997
  font-size: 14px;
989
998
  }
999
+ .text-\[15px\] {
1000
+ font-size: 15px;
1001
+ }
990
1002
  .text-\[17\.33px\] {
991
1003
  font-size: 17.33px;
992
1004
  }
@@ -1076,9 +1088,6 @@
1076
1088
  .text-\[\#666\] {
1077
1089
  color: #666;
1078
1090
  }
1079
- .text-\[\#171717\] {
1080
- color: #171717;
1081
- }
1082
1091
  .text-\[\#272727\] {
1083
1092
  color: #272727;
1084
1093
  }
@@ -1106,6 +1115,9 @@
1106
1115
  .text-\[red\] {
1107
1116
  color: red;
1108
1117
  }
1118
+ .text-\[white\] {
1119
+ color: white;
1120
+ }
1109
1121
  .capitalize {
1110
1122
  text-transform: capitalize;
1111
1123
  }
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ declare const FeatureServiceUiMobile: ({ serviceItem, showTopLabel, colors, isSoldOut, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, }: {
3
+ serviceItem: any;
4
+ showTopLabel: any;
5
+ colors: any;
6
+ isSoldOut: any;
7
+ cityOrigin: any;
8
+ cityDestination: any;
9
+ renderIcon: any;
10
+ viewersConfig: any;
11
+ isFeatureDropDownExpand: any;
12
+ onToggleExpand: any;
13
+ ticketQuantity?: number;
14
+ onIncreaseTicketQuantity: any;
15
+ onDecreaseTicketQuantity: any;
16
+ onBookButtonPress: any;
17
+ }) => React.JSX.Element;
18
+ export default FeatureServiceUiMobile;
@@ -0,0 +1,270 @@
1
+ import React from "react";
2
+ import LottiePlayer from "../../assets/LottiePlayer";
3
+ import commonService from "../../utils/CommonService";
4
+ const HARDCODED_OPERATORS = [
5
+ {
6
+ logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Turbus_logo.svg/320px-Turbus_logo.svg.png",
7
+ name: "Turbus",
8
+ time: "7:00 am",
9
+ seatsAvailable: "3 disponibles",
10
+ },
11
+ {
12
+ logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Pullman_Bus_logo.svg/320px-Pullman_Bus_logo.svg.png",
13
+ name: "Pullmanbus",
14
+ time: "8:00 am",
15
+ seatsAvailable: "5 disponibles",
16
+ },
17
+ {
18
+ logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Turbus_logo.svg/320px-Turbus_logo.svg.png",
19
+ name: "Expreso Santa C...",
20
+ time: "9:00 am",
21
+ seatsAvailable: "3 disponibles",
22
+ },
23
+ ];
24
+ const HARDCODED_COUNTDOWN = "09:55";
25
+ const HOW_IT_WORKS_STEPS = [
26
+ {
27
+ icon: "flexible",
28
+ name: "1. Salida flexible",
29
+ text: "Viajas en un horario entre las 07:00 y las 10:00 AM del día elegido.",
30
+ },
31
+ {
32
+ icon: "bus",
33
+ name: "2. Empresa asignada",
34
+ text: "Una de las empresas disponibles confirma tu viaje una vez pagado.",
35
+ },
36
+ {
37
+ icon: "price",
38
+ name: "3. Precio garantizado",
39
+ text: "Al seleccionar este servicio aseguras el precio reducido.",
40
+ },
41
+ {
42
+ icon: "ticket",
43
+ name: "4. ¡Listo!",
44
+ text: "Recibe todos los detalles de tu viaje al instante tras la compra.",
45
+ },
46
+ ];
47
+ const FeatureServiceUiMobile = ({ serviceItem, showTopLabel, colors, isSoldOut, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity = 1, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, }) => {
48
+ var _a, _b, _c, _d;
49
+ const operators = ((_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.operators) === null || _a === void 0 ? void 0 : _a.length) > 0
50
+ ? serviceItem.operators
51
+ : HARDCODED_OPERATORS;
52
+ const isItemExpanded = serviceItem.id === isFeatureDropDownExpand ||
53
+ isFeatureDropDownExpand === true;
54
+ const canDecreaseTicketQuantity = ticketQuantity > 1;
55
+ const HOW_IT_WORKS_STEPS = [
56
+ {
57
+ icon: "flexible",
58
+ name: "1. Salida flexible",
59
+ text: "Viajas en un horario entre las 07:00 y las 10:00 AM del día elegido.",
60
+ },
61
+ {
62
+ icon: "bus",
63
+ name: "2. Empresa asignada",
64
+ text: "Una de las empresas disponibles confirma tu viaje una vez pagado.",
65
+ },
66
+ {
67
+ icon: "price",
68
+ name: "3. Precio garantizado",
69
+ text: "Al seleccionar este servicio aseguras el precio reducido.",
70
+ },
71
+ {
72
+ icon: "ticket",
73
+ name: "4. ¡Listo!",
74
+ text: "Recibe todos los detalles de tu viaje al instante tras la compra.",
75
+ },
76
+ ];
77
+ const FeatureStepIcon = ({ icon }) => {
78
+ switch (icon) {
79
+ case "flexible":
80
+ return renderIcon("flexibleIcon", "20px");
81
+ case "bus":
82
+ return renderIcon("empressaIcon", "20px");
83
+ case "price":
84
+ return renderIcon("precioIcon", "20px");
85
+ default:
86
+ return renderIcon("listoIcon", "20px");
87
+ }
88
+ };
89
+ return (React.createElement("div", {
90
+ // ${
91
+ // serviceItem.offer_text ? "mb-[55px]" : "mb-[10px]"
92
+ // }
93
+ className: `relative mb-[10px]
94
+ ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
95
+ (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
96
+ showTopLabel
97
+ ? "mt-[24px]"
98
+ : "mt-[20px]"}` },
99
+ React.createElement("div", { className: "", style: {
100
+ border: "1px solid #c0c0c0",
101
+ padding: "12px",
102
+ borderRadius: "14px",
103
+ } },
104
+ React.createElement("div", { className: "flex flex-col items-center px-[12px] pb-[8px] text-[13.33px] gap-[8px]" },
105
+ React.createElement("div", null,
106
+ React.createElement("span", null,
107
+ renderIcon("fireIcon", "14px"),
108
+ " ",
109
+ React.createElement("span", { className: "bold-text" }, "Remate"),
110
+ " t\u00E9rmina en",
111
+ " ",
112
+ React.createElement("span", { className: "bold-text text-end", ref: (node) => commonService.startCountdown(node, 599), style: {
113
+ fontVariantNumeric: "tabular-nums",
114
+ display: "inline-block",
115
+ color: "#FF5C60",
116
+ minWidth: "40px",
117
+ } }))),
118
+ React.createElement("div", { className: "flex items-center gap-[10px]" },
119
+ React.createElement("span", null, "Salida flexible"),
120
+ React.createElement("div", { className: "bold-text font-[9px]", style: {
121
+ backgroundColor: "#FF5C60",
122
+ padding: "1px 8px",
123
+ borderRadius: "4px",
124
+ color: "#fff",
125
+ animation: "pulse-zoom 2s ease-in-out infinite",
126
+ whiteSpace: "nowrap",
127
+ } },
128
+ React.createElement("span", null, "AHORRAS 60%")))),
129
+ React.createElement("div", { id: `service-card-${serviceItem.id}`, className: "bg-[#0C1421] text-white mx-auto relative rounded-[14px] p-[14px] text-[13.33px]" },
130
+ React.createElement("div", { className: "flex flex-col gap-[10px]" },
131
+ React.createElement("div", { className: " text-[white]" },
132
+ React.createElement("div", { className: "flex flex-col gap-[10px] relative" },
133
+ React.createElement("div", { className: "flex items-center gap-[6px]" },
134
+ React.createElement("img", { src: (_b = serviceItem.icons) === null || _b === void 0 ? void 0 : _b.whiteOrigin, alt: "origin", className: `w-[14px] h-[14px] shrink-0 ${isSoldOut ? "grayscale" : ""}` }),
135
+ React.createElement("span", { className: "text-[13px] bold-text" }, cityOrigin === null || cityOrigin === void 0 ? void 0 :
136
+ cityOrigin.label.split(",")[0],
137
+ React.createElement("span", { className: "mx-[6px]" }, "\u2192"), cityDestination === null || cityDestination === void 0 ? void 0 :
138
+ cityDestination.label.split(",")[0])),
139
+ React.createElement("div", { style: {
140
+ width: "1px",
141
+ flex: 1,
142
+ backgroundColor: "#fff",
143
+ margin: "3px 0",
144
+ minHeight: "8px",
145
+ position: "absolute",
146
+ top: "13px",
147
+ left: "7px",
148
+ } }),
149
+ React.createElement("div", { className: "flex items-center gap-[6px]" },
150
+ React.createElement("img", { src: (_c = serviceItem.icons) === null || _c === void 0 ? void 0 : _c.whiteDestination, alt: "destination", className: `w-[14px] h-[14px] shrink-0 ${isSoldOut ? "grayscale" : ""}`, style: { opacity: isSoldOut ? 0.5 : 1 } }),
151
+ React.createElement("span", { className: "text-[13px]" },
152
+ "23 de mayo,",
153
+ " ",
154
+ React.createElement("span", { className: "bold-text" }, "Entre 07:00 AM y 10:00 AM"))))),
155
+ React.createElement("div", { className: "border-t border-[#363c48] my-[8px]" }),
156
+ React.createElement("div", null,
157
+ React.createElement("span", { className: "text-[15px] bold-text text-[white] flex items-center justify-center mb-[10px]" }, "3 operadores compitiendo por tu compra"),
158
+ React.createElement("div", { className: "flex gap-[8px] text-[white]" }, operators.map((op, idx) => (React.createElement("div", { key: idx, className: "flex min-w-0 flex-col items-center justify-center gap-[8px] rounded-[8px]", style: {
159
+ // height: "80px",
160
+ border: "1px solid #363c48",
161
+ backgroundColor: "#1a202e",
162
+ padding: "14px 10px",
163
+ } },
164
+ React.createElement("img", { src: serviceItem.operator_details[0], alt: op.name, className: `h-[24px] max-w-full object-contain ${isSoldOut ? "grayscale" : ""}` }),
165
+ React.createElement("span", { className: "text-[11px] truncate max-w-full text-center" }, serviceItem.operator_details[2]),
166
+ React.createElement("div", { className: "bg-[#FF8F45] text-[12px] font-bold px-[10px] py-[4px] rounded-[4px] bold-text whitespace-nowrap" },
167
+ React.createElement("span", null, op === null || op === void 0 ? void 0 : op.time)),
168
+ React.createElement("span", { className: "text-[10px] mt-[6px]" }, op === null || op === void 0 ? void 0 : op.seatsAvailable))))),
169
+ React.createElement("div", { className: "flex w-full items-center justify-center gap-[6px] text-[12px] mt-[12px]", style: {
170
+ border: "1px solid #363c48",
171
+ backgroundColor: "#1a202e",
172
+ padding: "4px 14px",
173
+ borderRadius: "24px",
174
+ } },
175
+ React.createElement(LottiePlayer, { animationData: serviceItem.icons.personsAnim,
176
+ // animationData={getAnimationIcon("usersAnimation")}
177
+ width: "18px", height: "18px" }),
178
+ React.createElement("span", null,
179
+ React.createElement("span", { className: "bold-text text-[white]" },
180
+ " ",
181
+ React.createElement("span", { className: "bold-text", ref: (node) => commonService.startViewerCount(node, viewersConfig), style: {
182
+ fontVariantNumeric: "tabular-nums",
183
+ color: "#FF5C60",
184
+ } }),
185
+ " "),
186
+ " ",
187
+ React.createElement("span", { className: "text-[white]" }, "viendo |"),
188
+ " ",
189
+ React.createElement("span", { className: "bold-text text-[white]", ref: (node) => commonService.startComprandoCount(node, 4, 16), style: { fontVariantNumeric: "tabular-nums" } }),
190
+ " ",
191
+ React.createElement("span", { className: "text-[white]" }, "han comprado"))),
192
+ React.createElement("div", { className: "mt-[10px] flex flex-col items-center gap-[8px]" },
193
+ React.createElement("span", { className: "text-[12px] text-[white]" }, "\u00BFCu\u00E1ntos pasajes quieres?"),
194
+ React.createElement("div", { className: "flex w-[50%] items-center justify-between", style: {
195
+ border: "1px solid #363c48",
196
+ backgroundColor: "#1a202e",
197
+ padding: "6px 14px",
198
+ borderRadius: "14px",
199
+ } },
200
+ React.createElement("button", { type: "button", "aria-label": "Disminuir pasajes", disabled: !canDecreaseTicketQuantity, onClick: () => onDecreaseTicketQuantity === null || onDecreaseTicketQuantity === void 0 ? void 0 : onDecreaseTicketQuantity(serviceItem), className: `flex h-[34px] w-[34px] items-center justify-center rounded-full border-none text-[25px] leading-none text-[white] ${canDecreaseTicketQuantity
201
+ ? "cursor-pointer bg-[#2d374d]"
202
+ : "cursor-not-allowed bg-[#222b3d] opacity-50"}` }, "-"),
203
+ React.createElement("span", { className: "bold-text text-[20px] text-white" }, ticketQuantity),
204
+ React.createElement("button", { type: "button", "aria-label": "Aumentar pasajes", onClick: () => onIncreaseTicketQuantity === null || onIncreaseTicketQuantity === void 0 ? void 0 : onIncreaseTicketQuantity(serviceItem), className: "flex h-[34px] w-[34px] cursor-pointer items-center justify-center rounded-full border-none bg-[#2d374d] text-[25px] leading-none text-[white]" }, "+"))),
205
+ React.createElement("div", { className: "mt-[10px] flex justify-between items-center rounded-[14px]", style: {
206
+ // height: "80px",
207
+ border: "1px solid #363c48",
208
+ backgroundColor: "#1a202e",
209
+ padding: "14px 10px",
210
+ } },
211
+ React.createElement("div", { className: "flex flex-col" },
212
+ React.createElement("span", { className: "text-[20px] font-normal leading-[20px] text-[#9f9f9f] relative", style: { position: "relative" } },
213
+ "$10.000",
214
+ React.createElement("span", { style: {
215
+ position: "absolute",
216
+ left: "-2px",
217
+ top: "50%",
218
+ width: "calc(80% + 4px)",
219
+ height: "1px",
220
+ backgroundColor: "#FF5C60",
221
+ transform: "rotate(-10deg)",
222
+ transformOrigin: "center",
223
+ } })),
224
+ React.createElement("span", { className: "text-[white] bold-text text-[28px] leading-none mt-[4px]" }, `$${(4000 * ticketQuantity).toLocaleString()}`)),
225
+ React.createElement("div", null,
226
+ React.createElement("span", { className: "text-[#FF8F45] bold-text text-[26px] leading-tight", style: {
227
+ animation: "pulse-zoom 2s ease-in-out infinite",
228
+ whiteSpace: "nowrap",
229
+ } }, "60% OFF"))),
230
+ React.createElement("button", { type: "button", onClick: onBookButtonPress, className: "flex items-center gap-[6px] px-[20px] py-[10px] rounded-[16px] text-[white] bold-text text-[13px] mt-[10px] justify-center border-none cursor-pointer", style: {
231
+ backgroundColor: "#FF5C60",
232
+ animation: "pulse-zoom 2s ease-in-out infinite",
233
+ whiteSpace: "nowrap",
234
+ width: "100%",
235
+ } },
236
+ React.createElement(LottiePlayer, { animationData: serviceItem.icons.thunderAnim, width: "18px", height: "18px" }),
237
+ React.createElement("span", { className: "whitespace-nowrap" }, "\u00A1Lo quiero!")),
238
+ React.createElement("div", { className: `flex justify-end mt-[10px] transition-transform duration-300 ease-in-out ${isItemExpanded ? "rotate-180" : ""}`, onClick: onToggleExpand },
239
+ React.createElement("img", { src: (_d = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.icons) === null || _d === void 0 ? void 0 : _d.downArrow, alt: "down arrow", style: {
240
+ width: "14px",
241
+ height: "8px",
242
+ filter: "brightness(0) invert(1)",
243
+ } }))))),
244
+ isItemExpanded && (React.createElement("div", { className: "flex flex-col gap-[10px]", style: {
245
+ opacity: isItemExpanded ? 1 : 0,
246
+ transition: "opacity 250ms ease-in-out",
247
+ } },
248
+ React.createElement("div", { className: ` text-[12px] ${isItemExpanded ? "pt-[14px] pb-[6px]" : "py-0"}`, style: { transition: "padding 300ms ease-in-out" } },
249
+ React.createElement("span", { className: "bold-text" }, "\u00BFC\u00F3mo funciona?"),
250
+ React.createElement("div", { className: "flex flex-col" }, HOW_IT_WORKS_STEPS.map((step) => (React.createElement("div", { className: "flex items-start gap-[8px] mt-[10px]" },
251
+ React.createElement("div", null,
252
+ React.createElement(FeatureStepIcon, { icon: step.icon })),
253
+ React.createElement("div", { className: "flex flex-col" },
254
+ React.createElement("span", { className: "bold-text" }, step.name),
255
+ React.createElement("span", null, step.text)))
256
+ // <div
257
+ // key={step.name}
258
+ // className="flex flex-col items-center text-center text-[#272727]"
259
+ // >
260
+ // <FeatureStepIcon icon={step.icon} />
261
+ // <span className="bold-text mt-[10px] text-[12px] leading-[14px]">
262
+ // {step.name}
263
+ // </span>
264
+ // <span className="mt-[2px] max-w-[220px] text-[12px] leading-[14px] text-[#4a4a4a]">
265
+ // {step.text}
266
+ // </span>
267
+ // </div>
268
+ )))))))));
269
+ };
270
+ export default FeatureServiceUiMobile;
@@ -1,8 +1,7 @@
1
1
  import React from "react";
2
- declare const FeatureServiceUi: ({ serviceItem, showTopLabel, colors, isSoldOut, getAnimationIcon, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, }: {
2
+ declare const FeatureServiceUi: ({ serviceItem, showTopLabel, isSoldOut, getAnimationIcon, cityOrigin, cityDestination, renderIcon, viewersConfig, isFeatureDropDownExpand, onToggleExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onBookButtonPress, }: {
3
3
  serviceItem: any;
4
4
  showTopLabel: any;
5
- colors: any;
6
5
  isSoldOut: any;
7
6
  getAnimationIcon: any;
8
7
  cityOrigin: any;