kupos-ui-components-lib 9.6.5 → 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.
- package/dist/components/ServiceItem/ServiceItemDesktop.js +1 -1
- package/dist/styles.css +7 -2
- package/dist/ui/mobileweb/DateTimeSectionMobile.js +14 -10
- package/package.json +1 -1
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +1 -1
- package/src/ui/mobileweb/DateTimeSectionMobile.tsx +8 -6
|
@@ -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:
|
|
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" : ""}` }),
|
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\:
|
|
483
|
-
grid-template-columns:
|
|
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;
|
|
@@ -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, }) =>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
React.createElement("div", { className: "
|
|
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
|
@@ -463,7 +463,7 @@ function ServiceItemPB({
|
|
|
463
463
|
: "",
|
|
464
464
|
}}
|
|
465
465
|
>
|
|
466
|
-
<div className="grid text-[#464647] w-full [grid-template-columns:
|
|
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>
|
|
@@ -65,8 +65,10 @@ const TimeRow: React.FC<TimeRowProps> = ({
|
|
|
65
65
|
date,
|
|
66
66
|
timeContent,
|
|
67
67
|
isSoldOut,
|
|
68
|
-
}) =>
|
|
69
|
-
|
|
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
|
-
{
|
|
98
|
+
{formattedDate}
|
|
97
99
|
</span>
|
|
98
|
-
<div className=
|
|
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,
|