kupos-ui-components-lib 9.6.4 → 9.6.6

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.
@@ -262,7 +262,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
262
262
  ? "14px"
263
263
  : "",
264
264
  } },
265
- React.createElement("div", { className: "grid text-[#464647] w-full [grid-template-columns:22%_28%_2.5%_24%_15.5%] gap-x-[2%] items-center" },
265
+ React.createElement("div", { className: "grid text-[#464647] w-full [grid-template-columns:20%_30%_2.5%_24%_15.5%] gap-x-[2%] items-center" },
266
266
  React.createElement("div", { className: "flex flex-col gap-[5px]" },
267
267
  React.createElement("div", null,
268
268
  React.createElement("img", { src: serviceItem.operator_details[0], alt: "service logo", className: `h-[30px] w-[auto] ${isSoldOut ? "grayscale" : ""}` }),
@@ -299,7 +299,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
299
299
  boxSizing: "border-box",
300
300
  }
301
301
  : {})) },
302
- React.createElement(ExpandedDropdown, { serviceItem: serviceItem, isPeru: isPeru, translation: translation, getAnimationIcon: getAnimationIcon, isChangeTicket: serviceItem.is_change_ticket === true, isSoldOut: isSoldOut })))),
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 })))),
303
303
  children,
304
304
  React.createElement(ServiceBadges, { showTopLabel: showTopLabel, isSoldOut: isSoldOut, colors: colors, renderIcon: renderIcon, translation: translation, serviceItem: serviceItem })))));
305
305
  }
package/dist/styles.css CHANGED
@@ -479,8 +479,8 @@
479
479
  .\[grid-template-columns\:14\%_40\%_0\.5\%_24\%_13\.5\%\] {
480
480
  grid-template-columns: 14% 40% 0.5% 24% 13.5%;
481
481
  }
482
- .\[grid-template-columns\:22\%_28\%_2\.5\%_24\%_15\.5\%\] {
483
- grid-template-columns: 22% 28% 2.5% 24% 15.5%;
482
+ .\[grid-template-columns\:20\%_30\%_2\.5\%_24\%_15\.5\%\] {
483
+ grid-template-columns: 20% 30% 2.5% 24% 15.5%;
484
484
  }
485
485
  .grid-cols-2 {
486
486
  grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -1061,6 +1061,11 @@
1061
1061
  }
1062
1062
  }
1063
1063
  }
1064
+ .max-\[399px\]\:left-\[53\%\] {
1065
+ @media (width < 399px) {
1066
+ left: 53%;
1067
+ }
1068
+ }
1064
1069
  .min-\[420\]\:text-\[12px\] {
1065
1070
  @media (width >= 420) {
1066
1071
  font-size: 12px;
@@ -11,6 +11,8 @@ interface ExpandedDropdownProps {
11
11
  getAnimationIcon?: (iconName: string) => any;
12
12
  isChangeTicket?: boolean;
13
13
  isSoldOut?: boolean;
14
+ ladiesBookedSeats?: string;
15
+ isDpEnabled?: boolean;
14
16
  }
15
- declare function ExpandedDropdown({ serviceItem, isPeru, translation, getAnimationIcon, isChangeTicket, isSoldOut, }: ExpandedDropdownProps): React.ReactElement;
17
+ declare function ExpandedDropdown({ serviceItem, isPeru, translation, getAnimationIcon, isChangeTicket, isSoldOut, ladiesBookedSeats, isDpEnabled, }: ExpandedDropdownProps): React.ReactElement;
16
18
  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, }) {
3
+ function ExpandedDropdown({ serviceItem, isPeru = false, translation = {}, getAnimationIcon, isChangeTicket = false, isSoldOut, ladiesBookedSeats, isDpEnabled, }) {
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: {
@@ -29,6 +29,13 @@ function ExpandedDropdown({ serviceItem, isPeru = false, translation = {}, getAn
29
29
  React.createElement(LottiePlayer, { animationData: getAnimationIcon("petFriendlyAnim"), width: "20px", height: "20px" }),
30
30
  React.createElement("div", { className: "h-auto mr-[4px] text-[13px] text-[#464647] bold-text" },
31
31
  React.createElement("span", null, translation === null || translation === void 0 ? void 0 : translation.petFriendly)))),
32
+ ladiesBookedSeats &&
33
+ String(ladiesBookedSeats).trim() !== "" &&
34
+ isDpEnabled === true && (React.createElement("div", { className: "flex gap-[6px]" },
35
+ React.createElement("span", { style: { marginTop: "2px" } }, "\u2022"),
36
+ React.createElement("span", null,
37
+ React.createElement("span", { className: "bold-text" }, "Asientos para damas:"),
38
+ " Esta empresa cuenta con asientos recomendados para mujeres."))),
32
39
  React.createElement("div", { className: "flex gap-[8px] text-[13.33px]" },
33
40
  React.createElement("span", { style: { marginTop: "2px" } }, "\u2022"),
34
41
  React.createElement("span", null,
@@ -21,16 +21,20 @@ const getCleanedDepTime = (raw) => {
21
21
  }
22
22
  return { cleaned, hasAM, hasPM };
23
23
  };
24
- const TimeRow = ({ label, icon, alt, date, timeContent, isSoldOut, }) => (React.createElement("div", { className: `flex items-center min-[420]:text-[13px] text-[12px] justify-between ${isSoldOut ? "text-[#c0c0c0]" : ""}` },
25
- React.createElement("div", { className: "flex items-center", style: { flex: 1 } },
26
- React.createElement("div", null,
27
- " ",
28
- label ? (React.createElement("div", { className: "w-[60px]" }, label)) : (React.createElement("div", { className: "w-[12px] h-auto mr-[5px]" },
29
- React.createElement("img", { src: icon, alt: alt, className: `w-[12px] h-auto mr-[5px] ${isSoldOut ? "grayscale" : ""}` })))),
30
- React.createElement("div", { className: "flex items-center relative capitalize justify-between", style: { flex: 1 } },
31
- React.createElement("span", { className: "cursor-pointer black-text" }, DateService.getServiceItemDate(date)),
32
- React.createElement("div", { className: "absolute left-[50%]" }, "\u2022"),
33
- React.createElement("div", { className: "font-[900] relative black-text" }, timeContent)))));
24
+ const TimeRow = ({ label, icon, alt, date, timeContent, isSoldOut, }) => {
25
+ const formattedDate = DateService.getServiceItemDate(date);
26
+ const dotPositionClass = formattedDate.includes("dom") ? "max-[399px]:left-[53%]" : "";
27
+ return React.createElement("div", { className: `flex items-center min-[420]:text-[13px] text-[12px] justify-between ${isSoldOut ? "text-[#c0c0c0]" : ""}` },
28
+ React.createElement("div", { className: "flex items-center", style: { flex: 1 } },
29
+ React.createElement("div", null,
30
+ " ",
31
+ label ? (React.createElement("div", { className: "w-[60px]" }, label)) : (React.createElement("div", { className: "w-[12px] h-auto mr-[5px]" },
32
+ React.createElement("img", { src: icon, alt: alt, className: `w-[12px] h-auto mr-[5px] ${isSoldOut ? "grayscale" : ""}` })))),
33
+ React.createElement("div", { className: "flex items-center relative capitalize justify-between", style: { flex: 1 } },
34
+ React.createElement("span", { className: "cursor-pointer black-text" }, formattedDate),
35
+ React.createElement("div", { className: `absolute left-[50%] ${dotPositionClass}` }, "\u2022"),
36
+ React.createElement("div", { className: "font-[900] relative black-text" }, timeContent))));
37
+ };
34
38
  function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal, isPeru, orignLabel, destinationLabel, originIcon, destinationIcon, travelDate, arrivalDate, depTime, arrTime, seatTypes, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, showLastSeats, discountSeatPriceColor, }) {
35
39
  const { cleaned: cleanedDepTime, hasAM, hasPM } = getCleanedDepTime(depTime);
36
40
  const depTimeContent = isLinatal ? (React.createElement("div", null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "9.6.4",
3
+ "version": "9.6.6",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -463,7 +463,7 @@ function ServiceItemPB({
463
463
  : "",
464
464
  }}
465
465
  >
466
- <div className="grid text-[#464647] w-full [grid-template-columns:22%_28%_2.5%_24%_15.5%] gap-x-[2%] items-center">
466
+ <div className="grid text-[#464647] w-full [grid-template-columns:20%_30%_2.5%_24%_15.5%] gap-x-[2%] items-center">
467
467
  {/* OPERATOR LOGO */}
468
468
  <div className="flex flex-col gap-[5px]">
469
469
  <div>
@@ -611,6 +611,8 @@ function ServiceItemPB({
611
611
  getAnimationIcon={getAnimationIcon}
612
612
  isChangeTicket={serviceItem.is_change_ticket === true}
613
613
  isSoldOut={isSoldOut}
614
+ ladiesBookedSeats={serviceItem.ladies_booked_seats}
615
+ isDpEnabled={serviceItem.is_dp_enabled}
614
616
  />
615
617
  </div>
616
618
  </div>
@@ -13,6 +13,8 @@ interface ExpandedDropdownProps {
13
13
  getAnimationIcon?: (iconName: string) => any;
14
14
  isChangeTicket?: boolean;
15
15
  isSoldOut?: boolean;
16
+ ladiesBookedSeats?: string;
17
+ isDpEnabled?: boolean;
16
18
  }
17
19
 
18
20
  function ExpandedDropdown({
@@ -22,6 +24,8 @@ function ExpandedDropdown({
22
24
  getAnimationIcon,
23
25
  isChangeTicket = false,
24
26
  isSoldOut,
27
+ ladiesBookedSeats,
28
+ isDpEnabled,
25
29
  }: ExpandedDropdownProps): React.ReactElement {
26
30
  const hasPetInfo =
27
31
  serviceItem.pet_seat_info &&
@@ -76,6 +80,18 @@ function ExpandedDropdown({
76
80
  </div>
77
81
  )}
78
82
 
83
+ {ladiesBookedSeats &&
84
+ String(ladiesBookedSeats).trim() !== "" &&
85
+ isDpEnabled === true && (
86
+ <div className="flex gap-[6px]">
87
+ <span style={{ marginTop: "2px" }}>•</span>
88
+ <span>
89
+ <span className="bold-text">Asientos para damas:</span> Esta
90
+ empresa cuenta con asientos recomendados para mujeres.
91
+ </span>
92
+ </div>
93
+ )}
94
+
79
95
  <div className="flex gap-[8px] text-[13.33px]">
80
96
  <span style={{ marginTop: "2px" }}>•</span>
81
97
  <span>
@@ -65,8 +65,10 @@ const TimeRow: React.FC<TimeRowProps> = ({
65
65
  date,
66
66
  timeContent,
67
67
  isSoldOut,
68
- }) => (
69
- <div
68
+ }) => {
69
+ const formattedDate = DateService.getServiceItemDate(date);
70
+ const dotPositionClass = formattedDate.includes("dom") ? "max-[399px]:left-[53%]" : "";
71
+ return <div
70
72
  className={`flex items-center min-[420]:text-[13px] text-[12px] justify-between ${
71
73
  isSoldOut ? "text-[#c0c0c0]" : ""
72
74
  }`}
@@ -93,14 +95,14 @@ const TimeRow: React.FC<TimeRowProps> = ({
93
95
  style={{ flex: 1 }}
94
96
  >
95
97
  <span className="cursor-pointer black-text">
96
- {DateService.getServiceItemDate(date)}
98
+ {formattedDate}
97
99
  </span>
98
- <div className="absolute left-[50%]">•</div>
100
+ <div className={`absolute left-[50%] ${dotPositionClass}`}>•</div>
99
101
  <div className="font-[900] relative black-text">{timeContent}</div>
100
102
  </div>
101
103
  </div>
102
- </div>
103
- );
104
+ </div>;
105
+ };
104
106
 
105
107
  function DateTimeSectionMobile({
106
108
  onBookButtonPress,