kupos-ui-components-lib 2.0.5 → 2.0.7
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.
|
@@ -8,6 +8,7 @@ import LottiePlayer from "../../assets/LottiePlayer";
|
|
|
8
8
|
const SEAT_EXCEPTIONS = ["Asiento mascota"];
|
|
9
9
|
function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, originIconStyle, t = (key) => key, }) {
|
|
10
10
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
11
|
+
console.log("🚀 ~ ServiceItemPB ~ serviceItem:", serviceItem);
|
|
11
12
|
const SvgAmenities = ({ moreAnemities, name, color, }) => {
|
|
12
13
|
const amenityKey = name.toLowerCase().replace(/\s/g, "_");
|
|
13
14
|
const getIconPath = () => {
|
|
@@ -282,9 +283,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
282
283
|
const onBookButtonPressHandler = () => {
|
|
283
284
|
onBookButtonPress();
|
|
284
285
|
};
|
|
285
|
-
return (React.createElement("div", { className: `relative ${serviceItem.offer_text
|
|
286
|
-
? "mb-[60px]"
|
|
287
|
-
: "mb-[20px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
|
|
286
|
+
return (React.createElement("div", { className: `relative ${serviceItem.offer_text ? "mb-[60px]" : "mb-[20px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
|
|
288
287
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
|
|
289
288
|
showTopLabel
|
|
290
289
|
? "mt-[24px]"
|
|
@@ -301,8 +300,8 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
301
300
|
React.createElement("div", { className: "flex items-center", style: { flex: 1 } },
|
|
302
301
|
React.createElement("div", null,
|
|
303
302
|
" ",
|
|
304
|
-
orignLabel ? (React.createElement("div", { className: "w-[60px]" }, orignLabel)) : (React.createElement("div", { className: " h-auto mr-[8px]", style: { width: originIconStyle ? "16px" : "18px" } },
|
|
305
|
-
React.createElement("img", { src: (_a = serviceItem.icons) === null || _a === void 0 ? void 0 : _a.origin, alt: "origin", className: ` h-auto mr-[8px] ${isSoldOut ? "grayscale" : ""}
|
|
303
|
+
orignLabel ? (React.createElement("div", { className: "w-[60px]" }, orignLabel)) : (React.createElement("div", { className: "w-[18px] h-auto mr-[8px]", style: { width: originIconStyle ? "16px" : "18px" } },
|
|
304
|
+
React.createElement("img", { src: (_a = serviceItem.icons) === null || _a === void 0 ? void 0 : _a.origin, alt: "origin", className: `w-[18px] h-auto mr-[8px] ${isSoldOut ? "grayscale" : ""}` })))),
|
|
306
305
|
React.createElement("div", { className: "flex items-center capitalize relative group items-center justify-between ", style: { flex: 1 } },
|
|
307
306
|
React.createElement("span", { className: "cursor-pointer bold-text" }, DateService.getServiceItemDate(serviceItem.travel_date)),
|
|
308
307
|
React.createElement("div", { className: "absolute left-[48%]" }, "\u2022"),
|
|
@@ -449,7 +448,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
449
448
|
} },
|
|
450
449
|
React.createElement(LottiePlayer, { animationData: serviceItem.icons.promoAnim, width: "18px", height: "18px" }),
|
|
451
450
|
React.createElement("span", { className: "ml-[10px]" }, serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text))),
|
|
452
|
-
React.createElement("div", { className: "absolute -top-[13px] left-0 w-full flex items-center justify-end gap-[12px] pr-[
|
|
451
|
+
React.createElement("div", { className: "absolute -top-[13px] left-0 w-full flex items-center justify-end gap-[12px] pr-[15px] z-10 " },
|
|
453
452
|
showTopLabel && (React.createElement("div", { className: `flex items-center gap-[10px] py-[5px] px-[14px] rounded-[38px] text-[13.33px] z-20`, style: { backgroundColor: !isSoldOut && colors.ratingBottomColor } },
|
|
454
453
|
React.createElement("div", { className: isSoldOut ? "grayscale" : "" },
|
|
455
454
|
React.createElement(LottiePlayer, { animationData: serviceItem.icons.priorityStageAnim, width: "16px", height: "16px" })),
|
package/dist/styles.css
CHANGED
package/package.json
CHANGED
|
@@ -30,6 +30,7 @@ function ServiceItemPB({
|
|
|
30
30
|
originIconStyle,
|
|
31
31
|
t = (key: string) => key,
|
|
32
32
|
}: ServiceItemProps & { currencySign?: string }): React.ReactElement {
|
|
33
|
+
console.log("🚀 ~ ServiceItemPB ~ serviceItem:", serviceItem);
|
|
33
34
|
const SvgAmenities = ({
|
|
34
35
|
moreAnemities,
|
|
35
36
|
name,
|
|
@@ -402,9 +403,7 @@ function ServiceItemPB({
|
|
|
402
403
|
return (
|
|
403
404
|
<div
|
|
404
405
|
className={`relative ${
|
|
405
|
-
serviceItem.offer_text
|
|
406
|
-
? "mb-[60px]"
|
|
407
|
-
: "mb-[20px]"
|
|
406
|
+
serviceItem.offer_text ? "mb-[60px]" : "mb-[20px]"
|
|
408
407
|
} ${
|
|
409
408
|
serviceItem?.is_direct_trip ||
|
|
410
409
|
serviceItem?.train_type_label === "Tren Express (Nuevo)" ||
|
|
@@ -480,16 +479,16 @@ function ServiceItemPB({
|
|
|
480
479
|
<div className="w-[60px]">{orignLabel}</div>
|
|
481
480
|
) : (
|
|
482
481
|
<div
|
|
483
|
-
className=" h-auto mr-[8px]"
|
|
482
|
+
className="w-[18px] h-auto mr-[8px]"
|
|
484
483
|
style={{ width: originIconStyle ? "16px" : "18px" }}
|
|
485
484
|
>
|
|
486
485
|
<img
|
|
487
486
|
src={serviceItem.icons?.origin}
|
|
488
487
|
alt="origin"
|
|
489
|
-
className={` h-auto mr-[8px] ${
|
|
488
|
+
className={`w-[18px] h-auto mr-[8px] ${
|
|
490
489
|
isSoldOut ? "grayscale" : ""
|
|
491
490
|
}`}
|
|
492
|
-
style={{ width: originIconStyle ? "16px" : "18px" }}
|
|
491
|
+
// style={{ width: originIconStyle ? "16px" : "18px" }}
|
|
493
492
|
/>
|
|
494
493
|
</div>
|
|
495
494
|
)}
|
|
@@ -1025,7 +1024,7 @@ function ServiceItemPB({
|
|
|
1025
1024
|
</div>
|
|
1026
1025
|
)}
|
|
1027
1026
|
|
|
1028
|
-
<div className="absolute -top-[13px] left-0 w-full flex items-center justify-end gap-[12px] pr-[
|
|
1027
|
+
<div className="absolute -top-[13px] left-0 w-full flex items-center justify-end gap-[12px] pr-[15px] z-10 ">
|
|
1029
1028
|
{showTopLabel && (
|
|
1030
1029
|
<div
|
|
1031
1030
|
className={`flex items-center gap-[10px] py-[5px] px-[14px] rounded-[38px] text-[13.33px] z-20`}
|