kupos-ui-components-lib 10.0.9 → 10.1.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.
@@ -75,7 +75,7 @@ const renderSummaryDetailsCard = ({ serviceName, date, source, dest, boardingSta
75
75
  };
76
76
  const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData, currencySign, dateOnward, dateReturn, sourceOnward, sourceReturn, destinationOnward, destinationReturn, boardingStageOnward, boardingStageReturn, droppingStageOnward, droppingStageReturn, boardingTimeOnward, boardingTimeReturn, droppingTimeOnward, droppingTimeReturn, durationOnward, durationReturn, selectSeatOnward, selectSeatReturn, journeyTypeActive, setJourneyTypeActive, translation, trainTypeOnward, trainTypeReturn, colors, trainType, icons, selectedOnward, selectedReturn, conexionChecked, conexionPassengers, returnConexionFare, conexionFare, loginData, checkWhatsappEligibility, removeDiscountAtomValue, netFare, promoCode, onPromoRemove, isAgency, agencyFee, walletMoney, virtualMoney, virtualLimit, showUsd, netFareInUsd, renderDiscount, discountAmount, currency, showWhatsappChargesInfo, setShowWhatsappChargesInfo, t, countdown, walletLabel, creditosLabel, isTacna, isLinatal, insuranceData, isPeru, setShowServicefeeModal, serviceFeeDataStateValue, }) => {
77
77
  var _a, _b, _c, _d, _e;
78
- return (React.createElement("div", { className: "pb-[10px]" },
78
+ return (React.createElement("div", { className: "pb-[15px]" },
79
79
  React.createElement("div", { className: "border border-[#ccc] m-[20px] rounded-[20px] relative" },
80
80
  React.createElement("div", { style: {
81
81
  position: "absolute",
@@ -229,7 +229,7 @@ const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData,
229
229
  walletMoney ? (React.createElement(PaymentItem, { label: walletLabel, amount: CommonService.currency(walletMoney, currencySign), className: "text-[14px]", customStyle: { color: "var(--secondary-color)" }, currency: "" })) : null,
230
230
  virtualMoney ? (React.createElement(PaymentItem, { label: React.createElement("span", { className: "secondary-text", style: { color: "var(--secondary-color)" } }, `${creditosLabel}(${virtualLimit}%)`), amount: CommonService.currency(virtualMoney, currencySign), customStyle: { color: "var(--secondary-color)" }, className: "text-[14px]", currency: "" })) : null,
231
231
  showUsd ? (React.createElement(PaymentItem, { label: React.createElement("span", { className: "primary-text" }, translation === null || translation === void 0 ? void 0 : translation.showUsd), amount: CommonService.currency(isAgency ? netFareInUsd + agencyFee : netFareInUsd, currencySign), currency: "USD", customStyle: { color: "var(--primary-color)" }, className: "text-[14px]" })) : null)),
232
- React.createElement("div", { className: ` text-[#fff] p-[10px_15px] text-left w-full flex items-center absolute -bottom-[9%] pt-[50px] z-1 rounded-b-[14px] text-[14px]`, style: { backgroundColor: colors === null || colors === void 0 ? void 0 : colors.bottomStripColor } },
232
+ React.createElement("div", { className: ` text-[#fff] p-[10px_15px] text-left w-full flex items-center absolute -bottom-[35px] pt-[50px] rounded-b-[14px] text-[14px]`, style: { backgroundColor: colors === null || colors === void 0 ? void 0 : colors.bottomStripColor } },
233
233
  React.createElement("div", { className: "flex justify-between items-center w-full text-[#fff]" },
234
234
  React.createElement("div", { className: "bold-text" }, "Total"),
235
235
  React.createElement("div", { className: "bold-text text-[14px] text-[#fff]", style: {
package/dist/styles.css CHANGED
@@ -81,9 +81,6 @@
81
81
  .right-\[25px\] {
82
82
  right: 25px;
83
83
  }
84
- .-bottom-\[9\%\] {
85
- bottom: calc(9% * -1);
86
- }
87
84
  .-bottom-\[30px\] {
88
85
  bottom: calc(30px * -1);
89
86
  }
@@ -1011,6 +1008,9 @@
1011
1008
  .pb-\[14px\] {
1012
1009
  padding-bottom: 14px;
1013
1010
  }
1011
+ .pb-\[15px\] {
1012
+ padding-bottom: 15px;
1013
+ }
1014
1014
  .pl-\[6px\] {
1015
1015
  padding-left: 6px;
1016
1016
  }
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import commonService from "../utils/CommonService";
2
3
  const StageTooltip = ({ children, stageData, direction = 1, terminals, serviceItem, metaData, colors, position = "right", }) => {
3
4
  // ✅ moved inside
4
5
  const hideBoardingTime = (serviceItemApiType) => {
@@ -27,13 +28,13 @@ const StageTooltip = ({ children, stageData, direction = 1, terminals, serviceIt
27
28
  const sortedStages = hideTime
28
29
  ? [...formattedStages].sort()
29
30
  : [...formattedStages].sort(compareTimings);
30
- return (React.createElement("div", { className: "flex flex-col space-y-3 text-justify gap-[4px]" }, sortedStages.map((item, key) => (React.createElement("div", { key: key, className: "font-normal" }, hideTime
31
+ return (React.createElement("div", { className: "flex flex-col space-y-3 text-justify gap-[4px]" }, sortedStages.map((item, key) => (React.createElement("div", { key: key, className: "font-normal" }, commonService.capitalize(hideTime
31
32
  ? item === null || item === void 0 ? void 0 : item.split("|")[0]
32
33
  : item
33
34
  .replace(/false/g, "")
34
35
  .replace("true", "")
35
36
  .replace("|", " |")
36
- .replace("||", " |"))))));
37
+ .replace("||", " |")))))));
37
38
  }
38
39
  return null;
39
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "10.0.9",
3
+ "version": "10.1.0",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -244,7 +244,7 @@ const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = ({
244
244
  serviceFeeDataStateValue,
245
245
  }) => {
246
246
  return (
247
- <div className="pb-[10px]">
247
+ <div className="pb-[15px]">
248
248
  <div className="border border-[#ccc] m-[20px] rounded-[20px] relative">
249
249
  <div
250
250
  style={{
@@ -650,7 +650,7 @@ const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = ({
650
650
  </div>
651
651
  </div>
652
652
  <div
653
- className={` text-[#fff] p-[10px_15px] text-left w-full flex items-center absolute -bottom-[9%] pt-[50px] z-1 rounded-b-[14px] text-[14px]`}
653
+ className={` text-[#fff] p-[10px_15px] text-left w-full flex items-center absolute -bottom-[35px] pt-[50px] rounded-b-[14px] text-[14px]`}
654
654
  style={{ backgroundColor: colors?.bottomStripColor }}
655
655
  >
656
656
  <div className="flex justify-between items-center w-full text-[#fff]">
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import commonService from "../utils/CommonService";
2
3
 
3
4
  const StageTooltip = ({
4
5
  children,
@@ -53,13 +54,15 @@ const StageTooltip = ({
53
54
  <div className="flex flex-col space-y-3 text-justify gap-[4px]">
54
55
  {sortedStages.map((item, key) => (
55
56
  <div key={key} className="font-normal">
56
- {hideTime
57
- ? item?.split("|")[0]
58
- : item
59
- .replace(/false/g, "")
60
- .replace("true", "")
61
- .replace("|", " |")
62
- .replace("||", " |")}
57
+ {commonService.capitalize(
58
+ hideTime
59
+ ? item?.split("|")[0]
60
+ : item
61
+ .replace(/false/g, "")
62
+ .replace("true", "")
63
+ .replace("|", " |")
64
+ .replace("||", " |"),
65
+ )}
63
66
  </div>
64
67
  ))}
65
68
  </div>