kupos-ui-components-lib 9.10.4 → 9.10.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.
@@ -89,7 +89,6 @@ const ANIMATION_MAP = {
89
89
  };
90
90
  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, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, }) {
91
91
  var _a, _b, _c;
92
- console.log("🚀 ~ ServiceItemPB ~ serviceItem:", serviceItem);
93
92
  const getAnimationIcon = (icon) => {
94
93
  var _a;
95
94
  const animation = ANIMATION_MAP[icon];
@@ -294,7 +293,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
294
293
  backgroundColor: "#ccc",
295
294
  } }),
296
295
  React.createElement("div", { className: "content-center" },
297
- React.createElement(SeatSection, { seatTypes: serviceItem.seat_types, serviceItem: serviceItem, availableSeats: serviceItem.available_seats, isSoldOut: isSoldOut, priceColor: colors.priceColor, dpSeatColor: colors.seatPriceColor, currencySign: currencySign, removeDuplicateSeats: removeDuplicateSeats, isPeru: isPeru, renderIcon: renderIcon, discountSeatPriceColor: colors.discountSeatPriceColor })),
296
+ React.createElement(SeatSection, { seatTypes: serviceItem.seat_types, serviceItem: serviceItem, availableSeats: serviceItem.available_seats, isSoldOut: isSoldOut, priceColor: colors.priceColor, dpSeatColor: colors.seatPriceColor, currencySign: currencySign, removeDuplicateSeats: removeDuplicateSeats, isPeru: isPeru, renderIcon: renderIcon, discountSeatPriceColor: colors.discountSeatPriceColor, tooltipColor: colors.tooltipColor })),
298
297
  React.createElement("div", { className: "relative" },
299
298
  React.createElement(KuposButton, { isSoldOut: isSoldOut, isLoading: serviceDetailsLoading, buttonColor: colors.kuposButtonColor, buyLabel: translation === null || translation === void 0 ? void 0 : translation.buyButton, soldOutLabel: translation === null || translation === void 0 ? void 0 : translation.soldOutButton, soldOutIcon: renderIcon("soldOutIcon", "14px"), onClick: checkMidnight }),
300
299
  showLastSeats ? (React.createElement("div", { className: "flex justify-center mr-[11px] w-[100%] right-[0px] absolute left-[0] top-[40px]" }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) < 10 &&
@@ -24,11 +24,12 @@ const NewUiOfferBanner = ({ offerText, isLoggedIn, showLoginModal, showLoginOpti
24
24
  React.createElement("span", { className: "bold-text", style: { marginLeft: offerText ? "6px" : "3px" } },
25
25
  truncateOfferText(offerText),
26
26
  " ",
27
- !hideRegister && (isLoggedIn && showLoginOption ? null : (React.createElement("span", { onClick: showLoginModal, className: "cursor-pointer" }, "- registro"))),
27
+ !hideRegister &&
28
+ (isLoggedIn && showLoginOption ? null : (React.createElement("span", { onClick: showLoginModal, className: "cursor-pointer" }, "- registro"))),
28
29
  " ",
29
30
  "\u00A0"),
30
31
  " ",
31
- offerText ? "|" : "",
32
+ offerText ? "| " : "",
32
33
  "Termina en\u00A0",
33
34
  React.createElement("span", { className: "bold-text text-end", ref: (node) => CommonService.startCountdown(node, 599), style: { fontVariantNumeric: "tabular-nums", display: "inline-block" } }))));
34
35
  const LegacyOfferBanner = ({ offerText, getAnimationIcon, }) => (React.createElement("div", { className: "flex items-center" },
@@ -16,6 +16,7 @@ interface SeatSectionProps {
16
16
  serviceItem?: any;
17
17
  renderIcon?: (iconKey: string, size?: string) => React.ReactNode;
18
18
  discountSeatPriceColor?: string;
19
+ tooltipColor?: string;
19
20
  }
20
- declare function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, renderIcon, dpSeatColor, discountSeatPriceColor, }: SeatSectionProps): React.ReactElement;
21
+ declare function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, renderIcon, dpSeatColor, discountSeatPriceColor, tooltipColor, }: SeatSectionProps): React.ReactElement;
21
22
  export default SeatSection;
@@ -54,7 +54,7 @@ function getUniqueSeats(seatTypes) {
54
54
  function getNumberOfSeats(seatTypes) {
55
55
  return seatTypes.filter((val) => !SEAT_EXCEPTIONS.includes(val.label)).length;
56
56
  }
57
- function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, renderIcon, dpSeatColor, discountSeatPriceColor, }) {
57
+ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, renderIcon, dpSeatColor, discountSeatPriceColor, tooltipColor, }) {
58
58
  var _a;
59
59
  const uniqueSeats = getUniqueSeats(seatTypes);
60
60
  const sortedSeatTypes = getSortedSeatTypes(seatTypes);
@@ -189,10 +189,11 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
189
189
  animation: "pulse-zoom 2s ease-in-out infinite",
190
190
  whiteSpace: "nowrap",
191
191
  } },
192
- React.createElement("span", { className: "rounded-[100px] bg-[#ff5964] px-[6px] px-[2px] w-fit text-[12px] bold-text leading-[20px] text-white", style: {
192
+ React.createElement("span", { className: "rounded-[100px] px-[6px] px-[2px] w-fit text-[12px] bold-text leading-[20px] text-white", style: {
193
193
  animation: "pulse-zoom 2s ease-in-out infinite",
194
194
  whiteSpace: "nowrap",
195
195
  color: dpSeatColor,
196
+ backgroundColor: tooltipColor,
196
197
  } }, "Mejor precio")),
197
198
  React.createElement("div", { className: "text-[22px] bold-text leading-[30px] text-center", style: { color: isSoldOut ? "#c0c0c0" : dpSeatColor } }, availableSeats <= 0
198
199
  ? CommonService.currency(0, currencySign)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "9.10.4",
3
+ "version": "9.10.6",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -144,7 +144,6 @@ function ServiceItemPB({
144
144
  wowDealData,
145
145
  isFlores,
146
146
  }: ServiceItemProps & { currencySign?: string }): React.ReactElement {
147
- console.log("🚀 ~ ServiceItemPB ~ serviceItem:", serviceItem);
148
147
  const getAnimationIcon = (icon: string) => {
149
148
  const animation = ANIMATION_MAP[icon];
150
149
  if (!animation) return null;
@@ -598,6 +597,7 @@ function ServiceItemPB({
598
597
  isPeru={isPeru}
599
598
  renderIcon={renderIcon}
600
599
  discountSeatPriceColor={colors.discountSeatPriceColor}
600
+ tooltipColor={colors.tooltipColor}
601
601
  />
602
602
  </div>
603
603
 
@@ -106,14 +106,15 @@ const NewUiOfferBanner: React.FC<NewUiOfferBannerProps> = ({
106
106
  style={{ marginLeft: offerText ? "6px" : "3px" }}
107
107
  >
108
108
  {truncateOfferText(offerText)}{" "}
109
- {!hideRegister && (isLoggedIn && showLoginOption ? null : (
110
- <span onClick={showLoginModal} className="cursor-pointer">
111
- - registro
112
- </span>
113
- ))}{" "}
109
+ {!hideRegister &&
110
+ (isLoggedIn && showLoginOption ? null : (
111
+ <span onClick={showLoginModal} className="cursor-pointer">
112
+ - registro
113
+ </span>
114
+ ))}{" "}
114
115
  &nbsp;
115
116
  </span>{" "}
116
- {offerText ? "|" : ""}
117
+ {offerText ? "| " : ""}
117
118
  Termina en&nbsp;
118
119
  <span
119
120
  className="bold-text text-end"
@@ -220,7 +221,7 @@ const OfferBanner: React.FC<OfferBannerProps> = ({
220
221
  if (isDpEnabledWithoutDiscounts) {
221
222
  return <PopularServiceBanner getAnimationIcon={getAnimationIcon} />;
222
223
  }
223
-
224
+
224
225
  const hasDp = hasDpDiscounts(serviceItem);
225
226
 
226
227
  if (hasDp || (isNewUiEnabled && serviceItem?.offer_text)) {
@@ -21,6 +21,7 @@ interface SeatSectionProps {
21
21
  serviceItem?: any;
22
22
  renderIcon?: (iconKey: string, size?: string) => React.ReactNode;
23
23
  discountSeatPriceColor?: string;
24
+ tooltipColor?: string;
24
25
  }
25
26
 
26
27
  function getAllSeatTypes(seatTypes: SeatType[]) {
@@ -102,6 +103,7 @@ function SeatSection({
102
103
  renderIcon,
103
104
  dpSeatColor,
104
105
  discountSeatPriceColor,
106
+ tooltipColor,
105
107
  }: SeatSectionProps): React.ReactElement {
106
108
  const uniqueSeats = getUniqueSeats(seatTypes);
107
109
  const sortedSeatTypes = getSortedSeatTypes(seatTypes);
@@ -368,11 +370,12 @@ function SeatSection({
368
370
  }}
369
371
  >
370
372
  <span
371
- className="rounded-[100px] bg-[#ff5964] px-[6px] px-[2px] w-fit text-[12px] bold-text leading-[20px] text-white"
373
+ className="rounded-[100px] px-[6px] px-[2px] w-fit text-[12px] bold-text leading-[20px] text-white"
372
374
  style={{
373
375
  animation: "pulse-zoom 2s ease-in-out infinite",
374
376
  whiteSpace: "nowrap",
375
377
  color: dpSeatColor,
378
+ backgroundColor: tooltipColor,
376
379
  }}
377
380
  >
378
381
  Mejor precio