kupos-ui-components-lib 9.11.8 → 9.11.9

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.
@@ -298,7 +298,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
298
298
  showTopLabel
299
299
  ? "mt-[30px]"
300
300
  : "mt-[20px]"} ` },
301
- ((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || hasDpEnabled) && !isSoldOut && (React.createElement(OfferBanner, { offerGradient: offerGradient, isSoldOut: isSoldOut, serviceItem: serviceItem, renderIcon: renderIcon, isLoggedIn: isLoggedIn, showLoginModal: showLoginModal, viewersConfig: viewersConfig, getAnimationIcon: getAnimationIcon, showLoginOption: showLoginOption, isNewUiEnabled: isNewUiEnabled, colors: colors })),
301
+ ((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) || hasDpEnabled) && !isSoldOut && (React.createElement(OfferBanner, { offerGradient: offerGradient, isSoldOut: isSoldOut, serviceItem: serviceItem, renderIcon: renderIcon, isLoggedIn: isLoggedIn, showLoginModal: showLoginModal, viewersConfig: viewersConfig, getAnimationIcon: getAnimationIcon, showLoginOption: showLoginOption, isNewUiEnabled: isNewUiEnabled, colors: colors, isLinatal: isLinatal })),
302
302
  React.createElement("div", { id: `service-card-${serviceItem.id}`, className: `bg-white mx-auto relative ${(hasOfferText && isNewUiEnabled && !isSoldOut) || hasDpEnabled
303
303
  ? "z-[3] rounded-[18px]"
304
304
  : "rounded-[10px] border border-[#ccc]"}`, style: serviceCardStyle },
@@ -344,10 +344,10 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
344
344
  gridTemplateRows: isItemExpanded ? "1fr" : "0fr",
345
345
  transition: "grid-template-rows 0.3s ease-in-out, opacity 0.25s ease-in-out",
346
346
  position: "relative",
347
- zIndex: hasOfferText || hasDpEnabled ? 0 : -1,
347
+ zIndex: hasDiscount || hasDpEnabled ? 0 : -1,
348
348
  marginTop: isItemExpanded ? "" : "-10px",
349
349
  } },
350
- React.createElement("div", { style: Object.assign({ overflow: "hidden", minHeight: 0, marginTop: hasDpEnabled || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ? "" : "-10px" }, (hasOfferText || hasDpEnabled
350
+ React.createElement("div", { style: Object.assign({ overflow: "hidden", minHeight: 0, marginTop: hasDpEnabled || hasDiscount ? "" : "-10px" }, (hasDpEnabled || hasDiscount
351
351
  ? {
352
352
  borderLeft: isSoldOut
353
353
  ? ""
@@ -16,6 +16,7 @@ interface OfferBannerProps {
16
16
  showLoginOption?: boolean;
17
17
  isNewUiEnabled?: boolean;
18
18
  colors: OfferBannerColors;
19
+ isLinatal?: boolean;
19
20
  }
20
21
  declare const OfferBanner: React.FC<OfferBannerProps>;
21
22
  export default OfferBanner;
@@ -54,7 +54,7 @@ const ViewersCount = ({ serviceItem, viewersConfig, getAnimationIcon, }) => {
54
54
  "comprando")))));
55
55
  };
56
56
  // ─── Main Component ───────────────────────────────────────────────────────────
57
- const OfferBanner = ({ offerGradient, isSoldOut, serviceItem, isLoggedIn, showLoginModal, viewersConfig, getAnimationIcon, showLoginOption, isNewUiEnabled, colors, }) => {
57
+ const OfferBanner = ({ offerGradient, isSoldOut, serviceItem, isLoggedIn, showLoginModal, viewersConfig, getAnimationIcon, showLoginOption, isNewUiEnabled, colors, isLinatal, }) => {
58
58
  const isLegacyOffer = !!(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) && !isNewUiEnabled && !(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled);
59
59
  const isDpEnabledWithoutDiscounts = (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) && !hasDpDiscounts(serviceItem);
60
60
  const showViewers = isNewUiEnabled || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled);
@@ -72,7 +72,11 @@ const OfferBanner = ({ offerGradient, isSoldOut, serviceItem, isLoggedIn, showLo
72
72
  }
73
73
  return null;
74
74
  };
75
- return (React.createElement("div", { className: "text-white p-[10px_15px] text-left w-full flex items-center absolute -bottom-[44px] pt-[50px] rounded-b-[14px] text-[14px] mt-[10px]", style: { background, opacity: isSoldOut ? 0.5 : 1 } },
75
+ return (React.createElement("div", { className: "text-white p-[10px_15px] text-left w-full flex items-center absolute -bottom-[44px] pt-[50px] rounded-b-[14px] text-[14px] mt-[10px]", style: {
76
+ background,
77
+ opacity: isSoldOut ? 0.5 : 1,
78
+ zIndex: isLinatal ? "-1" : "",
79
+ } },
76
80
  React.createElement("div", { className: "flex justify-between items-center w-full" },
77
81
  React.createElement("div", { className: "flex items-center" }, renderLeftContent()),
78
82
  showViewers && (React.createElement(ViewersCount, { serviceItem: serviceItem, viewersConfig: viewersConfig, getAnimationIcon: getAnimationIcon })))));
@@ -155,7 +155,6 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
155
155
  }
156
156
  return null;
157
157
  })();
158
- console.log("🚀 ~ SeatSection ~ serviceItem:", serviceItem);
159
158
  // Hide the % OFF badge when max_discount is capping the percentage discount
160
159
  // (i.e. both percentage and max_discount exist, and the raw % amount exceeds the cap)
161
160
  const isMaxDiscountApplied = (() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "9.11.8",
3
+ "version": "9.11.9",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -557,6 +557,7 @@ function ServiceItemPB({
557
557
  showLoginOption={showLoginOption}
558
558
  isNewUiEnabled={isNewUiEnabled}
559
559
  colors={colors}
560
+ isLinatal={isLinatal}
560
561
  />
561
562
  )}
562
563
  <div
@@ -727,7 +728,7 @@ function ServiceItemPB({
727
728
  transition:
728
729
  "grid-template-rows 0.3s ease-in-out, opacity 0.25s ease-in-out",
729
730
  position: "relative",
730
- zIndex: hasOfferText || hasDpEnabled ? 0 : -1,
731
+ zIndex: hasDiscount || hasDpEnabled ? 0 : -1,
731
732
  marginTop: isItemExpanded ? "" : "-10px",
732
733
  }}
733
734
  >
@@ -735,9 +736,8 @@ function ServiceItemPB({
735
736
  style={{
736
737
  overflow: "hidden",
737
738
  minHeight: 0,
738
- marginTop:
739
- hasDpEnabled || serviceItem?.offer_text ? "" : "-10px",
740
- ...(hasOfferText || hasDpEnabled
739
+ marginTop: hasDpEnabled || hasDiscount ? "" : "-10px",
740
+ ...(hasDpEnabled || hasDiscount
741
741
  ? {
742
742
  borderLeft: isSoldOut
743
743
  ? ""
@@ -29,6 +29,7 @@ interface OfferBannerProps {
29
29
  showLoginOption?: boolean;
30
30
  isNewUiEnabled?: boolean;
31
31
  colors: OfferBannerColors;
32
+ isLinatal?: boolean;
32
33
  }
33
34
 
34
35
  // ─── Helpers ──────────────────────────────────────────────────────────────────
@@ -206,6 +207,7 @@ const OfferBanner: React.FC<OfferBannerProps> = ({
206
207
  showLoginOption,
207
208
  isNewUiEnabled,
208
209
  colors,
210
+ isLinatal,
209
211
  }) => {
210
212
  const isLegacyOffer =
211
213
  !!serviceItem?.offer_text && !isNewUiEnabled && !serviceItem?.is_dp_enabled;
@@ -250,7 +252,11 @@ const OfferBanner: React.FC<OfferBannerProps> = ({
250
252
  return (
251
253
  <div
252
254
  className="text-white p-[10px_15px] text-left w-full flex items-center absolute -bottom-[44px] pt-[50px] rounded-b-[14px] text-[14px] mt-[10px]"
253
- style={{ background, opacity: isSoldOut ? 0.5 : 1 }}
255
+ style={{
256
+ background,
257
+ opacity: isSoldOut ? 0.5 : 1,
258
+ zIndex: isLinatal ? "-1" : "",
259
+ }}
254
260
  >
255
261
  <div className="flex justify-between items-center w-full">
256
262
  <div className="flex items-center">{renderLeftContent()}</div>
@@ -304,7 +304,6 @@ function SeatSection({
304
304
  }
305
305
  return null;
306
306
  })();
307
- console.log("🚀 ~ SeatSection ~ serviceItem:", serviceItem);
308
307
 
309
308
  // Hide the % OFF badge when max_discount is capping the percentage discount
310
309
  // (i.e. both percentage and max_discount exist, and the raw % amount exceeds the cap)