kupos-ui-components-lib 9.0.9 → 9.0.11

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.
Files changed (37) hide show
  1. package/dist/components/ServiceItem/PeruServiceItemDesktop.js +1 -1
  2. package/dist/components/ServiceItem/RatingHover.d.ts +1 -0
  3. package/dist/components/ServiceItem/RatingHover.js +30 -29
  4. package/dist/components/ServiceItem/ServiceItemDesktop.js +5 -3
  5. package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
  6. package/dist/components/ServiceItem/ServiceItemMobile.js +35 -10
  7. package/dist/components/ServiceItem/mobileTypes.d.ts +2 -0
  8. package/dist/styles.css +43 -0
  9. package/dist/ui/BottomAmenities/BottomAmenities.js +1 -1
  10. package/dist/ui/DateTimeSection/DateTimeSection.js +4 -4
  11. package/dist/ui/ExpendedDropDown/ExpandedDropdown.d.ts +1 -10
  12. package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +1 -1
  13. package/dist/ui/RatingBlock.d.ts +2 -1
  14. package/dist/ui/RatingBlock.js +2 -2
  15. package/dist/ui/SeatSection/SeatSection.js +20 -2
  16. package/dist/ui/TopAmenities/TopAmenities.js +6 -2
  17. package/dist/ui/mobileweb/BottomAmenitiesMobile.d.ts +2 -1
  18. package/dist/ui/mobileweb/BottomAmenitiesMobile.js +18 -18
  19. package/dist/ui/mobileweb/ExpandedDropdownMobile.d.ts +11 -0
  20. package/dist/ui/mobileweb/ExpandedDropdownMobile.js +32 -0
  21. package/dist/ui/mobileweb/TopAmenitieMobile.d.ts +4 -1
  22. package/dist/ui/mobileweb/TopAmenitieMobile.js +40 -7
  23. package/package.json +1 -1
  24. package/src/components/ServiceItem/PeruServiceItemDesktop.tsx +1 -0
  25. package/src/components/ServiceItem/RatingHover.tsx +51 -48
  26. package/src/components/ServiceItem/ServiceItemDesktop.tsx +5 -9
  27. package/src/components/ServiceItem/ServiceItemMobile.tsx +47 -8
  28. package/src/components/ServiceItem/mobileTypes.ts +2 -0
  29. package/src/ui/BottomAmenities/BottomAmenities.tsx +8 -8
  30. package/src/ui/DateTimeSection/DateTimeSection.tsx +4 -4
  31. package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +0 -12
  32. package/src/ui/RatingBlock.tsx +2 -0
  33. package/src/ui/SeatSection/SeatSection.tsx +22 -2
  34. package/src/ui/TopAmenities/TopAmenities.tsx +11 -3
  35. package/src/ui/mobileweb/BottomAmenitiesMobile.tsx +65 -64
  36. package/src/ui/mobileweb/ExpandedDropdownMobile.tsx +56 -0
  37. package/src/ui/mobileweb/TopAmenitieMobile.tsx +46 -6
@@ -1,6 +1,33 @@
1
1
  import React from "react";
2
2
  import LottiePlayer from "../../assets/LottiePlayer";
3
- function TopAmenitieMobile({ showTopLabel, isSoldOut, seatPriceColor, bombAnim, priorityStageAnim, }) {
3
+ function TopAmenitieMobile({ showTopLabel, isSoldOut, seatPriceColor, bombAnim, priorityStageAnim, countdownSeconds = 0, onCountdownEnd, }) {
4
+ const pad = (n) => String(n).padStart(2, "0");
5
+ const startCountdown = (el) => {
6
+ if (!el || el.dataset.timerStarted)
7
+ return;
8
+ el.dataset.timerStarted = "true";
9
+ let remaining = countdownSeconds;
10
+ const update = () => {
11
+ const hrs = Math.floor(remaining / 3600);
12
+ const mins = Math.floor((remaining % 3600) / 60);
13
+ const secs = remaining % 60;
14
+ el.textContent = `${pad(hrs)}:${pad(mins)}:${pad(secs)}`;
15
+ };
16
+ update();
17
+ const timer = setInterval(() => {
18
+ if (remaining <= 0) {
19
+ clearInterval(timer);
20
+ const promoBar = el.closest("[data-promo-bar]");
21
+ if (promoBar)
22
+ promoBar.style.display = "none";
23
+ if (onCountdownEnd)
24
+ onCountdownEnd();
25
+ return;
26
+ }
27
+ remaining--;
28
+ update();
29
+ }, 1000);
30
+ };
4
31
  return (React.createElement("div", { style: {
5
32
  display: "flex",
6
33
  justifyContent: "flex-end",
@@ -12,18 +39,24 @@ function TopAmenitieMobile({ showTopLabel, isSoldOut, seatPriceColor, bombAnim,
12
39
  position: "relative",
13
40
  right: showTopLabel ? "-21px" : "",
14
41
  padding: "0 14px",
15
- borderTopRightRadius: "14px",
16
- borderTopLeftRadius: "14px",
42
+ borderTopRightRadius: "12px",
43
+ borderTopLeftRadius: "12px",
17
44
  } },
18
45
  React.createElement("div", { style: { display: "flex", alignItems: "center", color: "#fff" } },
19
- React.createElement(LottiePlayer, { animationData: bombAnim, width: "12px", height: "12px" }),
46
+ React.createElement(LottiePlayer, { animationData: bombAnim, width: "16px", height: "16px" }),
20
47
  React.createElement("span", { className: "flex items-center gap-[5px] py-[6px] pl-[6px] text-[12px] z-20", style: { paddingRight: showTopLabel ? "20px" : "0" } },
21
48
  React.createElement("span", { className: "bold-text" }, "kuponazo 20% "),
22
- " | 02:10:30"))),
49
+ " |",
50
+ " ",
51
+ React.createElement("span", { ref: startCountdown, style: {
52
+ fontVariantNumeric: "tabular-nums",
53
+ display: "inline-block",
54
+ minWidth: "50px",
55
+ } })))),
23
56
  showTopLabel && (React.createElement("div", { className: `flex items-center gap-[5px] py-[6px] px-[10px] text-[12px] z-20`, style: {
24
57
  backgroundColor: isSoldOut ? "#ddd" : "#ff8f45",
25
- borderTopRightRadius: "10px",
26
- borderTopLeftRadius: "10px",
58
+ borderTopRightRadius: "12px",
59
+ borderTopLeftRadius: "12px",
27
60
  } },
28
61
  React.createElement(LottiePlayer, { animationData: priorityStageAnim, width: "12px", height: "12px" }),
29
62
  React.createElement("div", { className:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "9.0.9",
3
+ "version": "9.0.11",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -462,6 +462,7 @@ function PeruServiceItemDesktop({
462
462
  colors={colors}
463
463
  t={t}
464
464
  translation={translation}
465
+ isPeru={isPeru}
465
466
  />
466
467
  ),
467
468
  },
@@ -7,6 +7,7 @@ interface RatingHoverProps {
7
7
  colors: any;
8
8
  t?: (key: string) => string;
9
9
  translation?: { [key: string]: string };
10
+ isPeru?: boolean;
10
11
  }
11
12
 
12
13
  const RatingHover: React.FC<RatingHoverProps> = ({
@@ -15,7 +16,9 @@ const RatingHover: React.FC<RatingHoverProps> = ({
15
16
  colors,
16
17
  t = (key: string) => key,
17
18
  translation,
19
+ isPeru,
18
20
  }) => {
21
+ const ratingIndex = isPeru ? 7 : 6;
19
22
  return (
20
23
  <div className="flex items-center">
21
24
  <div className="w-[18px] h-auto mr-[4px] relative">
@@ -59,28 +62,28 @@ const RatingHover: React.FC<RatingHoverProps> = ({
59
62
  <div className="px-3 py-2 flex flex-col gap-[10px] font9">
60
63
  <RatingItem
61
64
  rating={
62
- serviceItem.operator_details[6] &&
63
- serviceItem.operator_details[6][
65
+ serviceItem.operator_details[ratingIndex] &&
66
+ serviceItem.operator_details[ratingIndex][
64
67
  Object.keys(
65
- serviceItem.operator_details[6] &&
66
- serviceItem.operator_details[6]
68
+ serviceItem.operator_details[ratingIndex] &&
69
+ serviceItem.operator_details[ratingIndex],
67
70
  )[0]
68
71
  ] &&
69
72
  parseFloat(
70
- serviceItem.operator_details[6][
73
+ serviceItem.operator_details[ratingIndex][
71
74
  Object.keys(
72
- serviceItem.operator_details[6] &&
73
- serviceItem.operator_details[6]
75
+ serviceItem.operator_details[ratingIndex] &&
76
+ serviceItem.operator_details[ratingIndex],
74
77
  )[0]
75
- ]
78
+ ],
76
79
  ).toFixed(1)
77
80
  ? +parseFloat(
78
- serviceItem.operator_details[6][
81
+ serviceItem.operator_details[ratingIndex][
79
82
  Object.keys(
80
- serviceItem.operator_details[6] &&
81
- serviceItem.operator_details[6]
83
+ serviceItem.operator_details[ratingIndex] &&
84
+ serviceItem.operator_details[ratingIndex],
82
85
  )[0]
83
- ]
86
+ ],
84
87
  ).toFixed(1)
85
88
  : 0
86
89
  }
@@ -89,28 +92,28 @@ const RatingHover: React.FC<RatingHoverProps> = ({
89
92
  />
90
93
  <RatingItem
91
94
  rating={
92
- serviceItem.operator_details[6] &&
93
- serviceItem.operator_details[6][
95
+ serviceItem.operator_details[ratingIndex] &&
96
+ serviceItem.operator_details[ratingIndex][
94
97
  Object.keys(
95
- serviceItem.operator_details[6] &&
96
- serviceItem.operator_details[6]
98
+ serviceItem.operator_details[ratingIndex] &&
99
+ serviceItem.operator_details[ratingIndex],
97
100
  )[1]
98
101
  ] &&
99
102
  parseFloat(
100
- serviceItem.operator_details[6][
103
+ serviceItem.operator_details[ratingIndex][
101
104
  Object.keys(
102
- serviceItem.operator_details[6] &&
103
- serviceItem.operator_details[6]
105
+ serviceItem.operator_details[ratingIndex] &&
106
+ serviceItem.operator_details[ratingIndex],
104
107
  )[1]
105
- ]
108
+ ],
106
109
  ).toFixed(1)
107
110
  ? +parseFloat(
108
- serviceItem.operator_details[6][
111
+ serviceItem.operator_details[ratingIndex][
109
112
  Object.keys(
110
- serviceItem.operator_details[6] &&
111
- serviceItem.operator_details[6]
113
+ serviceItem.operator_details[ratingIndex] &&
114
+ serviceItem.operator_details[ratingIndex],
112
115
  )[1]
113
- ]
116
+ ],
114
117
  ).toFixed(1)
115
118
  : 0
116
119
  }
@@ -119,28 +122,28 @@ const RatingHover: React.FC<RatingHoverProps> = ({
119
122
  />
120
123
  <RatingItem
121
124
  rating={
122
- serviceItem.operator_details[6] &&
123
- serviceItem.operator_details[6][
125
+ serviceItem.operator_details[ratingIndex] &&
126
+ serviceItem.operator_details[ratingIndex][
124
127
  Object.keys(
125
- serviceItem.operator_details[6] &&
126
- serviceItem.operator_details[6]
128
+ serviceItem.operator_details[ratingIndex] &&
129
+ serviceItem.operator_details[ratingIndex],
127
130
  )[2]
128
131
  ] &&
129
132
  parseFloat(
130
- serviceItem.operator_details[6][
133
+ serviceItem.operator_details[ratingIndex][
131
134
  Object.keys(
132
- serviceItem.operator_details[6] &&
133
- serviceItem.operator_details[6]
135
+ serviceItem.operator_details[ratingIndex] &&
136
+ serviceItem.operator_details[ratingIndex],
134
137
  )[2]
135
- ]
138
+ ],
136
139
  ).toFixed(1)
137
140
  ? +parseFloat(
138
- serviceItem.operator_details[6][
141
+ serviceItem.operator_details[ratingIndex][
139
142
  Object.keys(
140
- serviceItem.operator_details[6] &&
141
- serviceItem.operator_details[6]
143
+ serviceItem.operator_details[ratingIndex] &&
144
+ serviceItem.operator_details[ratingIndex],
142
145
  )[2]
143
- ]
146
+ ],
144
147
  ).toFixed(1)
145
148
  : 0
146
149
  }
@@ -149,28 +152,28 @@ const RatingHover: React.FC<RatingHoverProps> = ({
149
152
  />
150
153
  <RatingItem
151
154
  rating={
152
- serviceItem.operator_details[6] &&
153
- serviceItem.operator_details[6][
155
+ serviceItem.operator_details[ratingIndex] &&
156
+ serviceItem.operator_details[ratingIndex][
154
157
  Object.keys(
155
- serviceItem.operator_details[6] &&
156
- serviceItem.operator_details[6]
158
+ serviceItem.operator_details[ratingIndex] &&
159
+ serviceItem.operator_details[ratingIndex],
157
160
  )[3]
158
161
  ] &&
159
162
  parseFloat(
160
- serviceItem.operator_details[6][
163
+ serviceItem.operator_details[ratingIndex][
161
164
  Object.keys(
162
- serviceItem.operator_details[6] &&
163
- serviceItem.operator_details[6]
165
+ serviceItem.operator_details[ratingIndex] &&
166
+ serviceItem.operator_details[ratingIndex],
164
167
  )[3]
165
- ]
168
+ ],
166
169
  ).toFixed(1)
167
170
  ? +parseFloat(
168
- serviceItem.operator_details[6][
171
+ serviceItem.operator_details[ratingIndex][
169
172
  Object.keys(
170
- serviceItem.operator_details[6] &&
171
- serviceItem.operator_details[6]
173
+ serviceItem.operator_details[ratingIndex] &&
174
+ serviceItem.operator_details[ratingIndex],
172
175
  )[3]
173
- ]
176
+ ],
174
177
  ).toFixed(1)
175
178
  : 0
176
179
  }
@@ -182,7 +182,7 @@ function ServiceItemPB({
182
182
  };
183
183
 
184
184
  const checkMidnight = () => {
185
- setIsExpand(null);
185
+ setIsExpand?.(null);
186
186
  if (
187
187
  cityOrigin?.label &&
188
188
  cityDestination?.label &&
@@ -468,6 +468,7 @@ function ServiceItemPB({
468
468
  colors={colors}
469
469
  t={t}
470
470
  translation={translation}
471
+ isPeru={isPeru}
471
472
  />
472
473
  </div>
473
474
 
@@ -563,19 +564,14 @@ function ServiceItemPB({
563
564
  opacity: isItemExpanded ? 1 : 0,
564
565
  transition:
565
566
  "grid-template-rows 0.3s ease-in-out, opacity 0.25s ease-in-out",
567
+ position: "relative",
568
+ zIndex: -1,
566
569
  }}
567
570
  >
568
571
  <div
569
572
  style={{ overflow: "hidden", minHeight: 0, marginTop: "-10px" }}
570
573
  >
571
- <ExpandedDropdown
572
- serviceItem={serviceItem}
573
- showPromo={showPromo}
574
- colors={colors}
575
- grayscaleClass={grayscaleClass}
576
- translation={translation}
577
- getAnimationIcon={getAnimationIcon}
578
- />
574
+ <ExpandedDropdown serviceItem={serviceItem} />
579
575
  </div>
580
576
  </div>
581
577
 
@@ -7,6 +7,7 @@ import TopAmenitieMobile from "../../ui/mobileweb/TopAmenitieMobile";
7
7
  import BottomAmenitiesMobile from "../../ui/mobileweb/BottomAmenitiesMobile";
8
8
  import SeatSectionMobile from "../../ui/mobileweb/SeatSectionMobile";
9
9
  import DateTimeSectionMobile from "../../ui/mobileweb/DateTimeSectionMobile";
10
+ import ExpandedDropdownMobile from "../../ui/mobileweb/ExpandedDropdownMobile";
10
11
 
11
12
  const SEAT_EXCEPTIONS = ["Asiento mascota"];
12
13
 
@@ -32,6 +33,8 @@ function ServiceItemMobile({
32
33
  amenitiesData,
33
34
  setShowDropdown,
34
35
  showDropdown,
36
+ isExpanded,
37
+ setIsExpanded,
35
38
  setAmenetiesAtomValue,
36
39
  isCiva,
37
40
  currencySign,
@@ -41,10 +44,13 @@ function ServiceItemMobile({
41
44
  removeDuplicateSeats,
42
45
  isLinatal,
43
46
  }: MobileServiceItemProps): React.ReactElement {
47
+ const isItemExpanded = serviceItem.id === isExpanded;
44
48
  const isPetSeat = (Object.keys(serviceItem?.pet_seat_info) || []).length > 0;
45
49
  let isSoldOut = serviceItem.available_seats <= 0;
46
50
  const showPromo = Math.random() > 0.5;
47
51
 
52
+ const countdownSeconds = 7830;
53
+
48
54
  const labelId =
49
55
  typeof serviceItem.boarding_stages === "string"
50
56
  ? serviceItem.boarding_stages.split("|")[0]
@@ -135,6 +141,17 @@ function ServiceItemMobile({
135
141
  seatPriceColor={colors.seatPriceColor}
136
142
  bombAnim={serviceItem.icons.bombAnim}
137
143
  priorityStageAnim={serviceItem.icons.priorityStageAnim}
144
+ countdownSeconds={countdownSeconds}
145
+ onCountdownEnd={() => {
146
+ const cardEl = document.getElementById(
147
+ `service-card-${serviceItem.id}`,
148
+ );
149
+ if (!cardEl) return;
150
+ cardEl.style.border = "1px solid #ccc";
151
+ if (!showTopLabel) {
152
+ cardEl.style.borderRadius = "10px";
153
+ }
154
+ }}
138
155
  />
139
156
  <div
140
157
  className={" rounded-[20px]"}
@@ -142,7 +159,7 @@ function ServiceItemMobile({
142
159
  backgroundColor: "#fff",
143
160
  zIndex: 1,
144
161
  // borderRadius: showTopLabel ? "10px 0 10px 10px" : "10px",
145
- borderRadius: "14px 0 14px 14px",
162
+ borderRadius: "12px 0 12px 12px",
146
163
  border: `1px solid ${colors.bottomStripColor}`,
147
164
  }}
148
165
  >
@@ -268,14 +285,19 @@ function ServiceItemMobile({
268
285
  isTrackingEnabled={serviceItem?.is_tracking_enabled}
269
286
  locationAnim={serviceItem.icons.locationAnim}
270
287
  downArrowIcon={serviceItem.icons.downArrow}
271
- showDropdown={showDropdown}
272
- setShowDropdown={setShowDropdown}
288
+ showDropdown={isItemExpanded}
289
+ setShowDropdown={() =>
290
+ setIsExpanded(isItemExpanded ? null : serviceItem.id)
291
+ }
292
+ // onDropdownToggle={() => {
293
+ // setShowDropdown(!showDropdown);
294
+ // setAmenetiesAtomValue({
295
+ // service: serviceItem,
296
+ // showTopLabel: showTopLabel,
297
+ // });
298
+ // }}
273
299
  onDropdownToggle={() => {
274
- setShowDropdown(!showDropdown);
275
- setAmenetiesAtomValue({
276
- service: serviceItem,
277
- showTopLabel: showTopLabel,
278
- });
300
+ setIsExpanded(isItemExpanded ? null : serviceItem.id);
279
301
  }}
280
302
  />
281
303
  </div>
@@ -374,6 +396,23 @@ function ServiceItemMobile({
374
396
  )} */}
375
397
  </div>
376
398
  </div>
399
+
400
+ {/* 🔹 EXPANDABLE DROPDOWN (below the card) */}
401
+ <div
402
+ style={{
403
+ display: "grid",
404
+ gridTemplateRows: isItemExpanded ? "1fr" : "0fr",
405
+ opacity: isItemExpanded ? 1 : 0,
406
+ transition:
407
+ "grid-template-rows 0.3s ease-in-out, opacity 0.25s ease-in-out",
408
+ position: "relative",
409
+ zIndex: -1,
410
+ }}
411
+ >
412
+ <div style={{ overflow: "hidden", minHeight: 0, marginTop: "-10px" }}>
413
+ <ExpandedDropdownMobile serviceItem={serviceItem} />
414
+ </div>
415
+ </div>
377
416
  </div>
378
417
  );
379
418
  }
@@ -124,6 +124,8 @@ export interface MobileServiceItemProps {
124
124
  terminals?: any[];
125
125
  showDropdown?: boolean;
126
126
  setShowDropdown?: (value: boolean) => void;
127
+ isExpanded?: string | null;
128
+ setIsExpanded?: (value: string | null) => void;
127
129
  setAmenetiesAtomValue?: (
128
130
  value:
129
131
  | {
@@ -94,14 +94,14 @@ function BottomAmenities({
94
94
  )}
95
95
 
96
96
  {/* DOWN ARROW ICON */}
97
- {showDownArrow ? (
98
- <div
99
- className={`flex items-center cursor-pointer ml-[4px] transition-transform duration-300 w-[14px] h-[14px] ${isItemExpanded ? "rotate-180" : ""}`}
100
- onClick={onToggleExpand}
101
- >
102
- {downArrowIcon}
103
- </div>
104
- ) : null}
97
+ {/* {showDownArrow ? ( */}
98
+ <div
99
+ className={`flex items-center cursor-pointer ml-[4px] transition-transform duration-300 w-[14px] h-[14px] `}
100
+ onClick={onToggleExpand}
101
+ >
102
+ {downArrowIcon}
103
+ </div>
104
+ {/* ) : null} */}
105
105
  </div>
106
106
  </div>
107
107
  );
@@ -68,7 +68,7 @@ function DateTimeSection({
68
68
  }}
69
69
  >
70
70
  {/* ICONS COLUMN */}
71
- <div className="flex flex-col gap-[6px]">
71
+ <div className="flex flex-col gap-[4px]">
72
72
  {/* Origin Icon */}
73
73
  {orignLabel ? (
74
74
  <div className="w-[60px] h-[20px] flex items-center">
@@ -106,7 +106,7 @@ function DateTimeSection({
106
106
  </div>
107
107
 
108
108
  {/* DATES COLUMN */}
109
- <div className="flex flex-col gap-[6px]">
109
+ <div className="flex flex-col gap-[4px]">
110
110
  {/* Departure Date */}
111
111
  <StageTooltip
112
112
  stageData={serviceItem.boarding_stages}
@@ -139,7 +139,7 @@ function DateTimeSection({
139
139
  </div>
140
140
 
141
141
  {/* DOTS COLUMN */}
142
- <div className="flex flex-col gap-[6px] items-center">
142
+ <div className="flex flex-col gap-[4px] items-center">
143
143
  {/* Departure Dot */}
144
144
  <div className="h-[20px] flex items-center justify-center">
145
145
  <div>•</div>
@@ -156,7 +156,7 @@ function DateTimeSection({
156
156
  </div>
157
157
 
158
158
  {/* TIMES COLUMN */}
159
- <div className="flex flex-col gap-[6px]">
159
+ <div className="flex flex-col gap-[4px]">
160
160
  {/* Departure Time */}
161
161
  <StageTooltip
162
162
  stageData={serviceItem.dropoff_stages}
@@ -8,22 +8,10 @@ interface ExpandedDropdownProps {
8
8
  is_change_ticket?: boolean;
9
9
  is_tracking_enabled?: boolean;
10
10
  };
11
- showPromo: boolean;
12
- colors: {
13
- priceColor?: string;
14
- };
15
- grayscaleClass: string;
16
- translation?: { [key: string]: string };
17
- getAnimationIcon: (icon: string) => any;
18
11
  }
19
12
 
20
13
  function ExpandedDropdown({
21
14
  serviceItem,
22
- showPromo,
23
- colors,
24
- grayscaleClass,
25
- translation,
26
- getAnimationIcon,
27
15
  }: ExpandedDropdownProps): React.ReactElement {
28
16
  const hasPetInfo =
29
17
  serviceItem.pet_seat_info &&
@@ -8,6 +8,7 @@ const RatingBlock = ({
8
8
  colors,
9
9
  t,
10
10
  translation,
11
+ isPeru,
11
12
  }) => (
12
13
  <div className="flex items-center whitespace-nowrap">
13
14
  {showRating && (
@@ -17,6 +18,7 @@ const RatingBlock = ({
17
18
  colors={colors}
18
19
  t={t}
19
20
  translation={translation}
21
+ isPeru={isPeru}
20
22
  />
21
23
  )}
22
24
 
@@ -50,6 +50,13 @@ function getSortedSeatTypes(seatTypes: SeatType[]) {
50
50
 
51
51
  seatTypesWithPrices = seatTypesWithPrices.slice(0, 2);
52
52
 
53
+ const seenPrices = new Set<number>();
54
+ seatTypesWithPrices = seatTypesWithPrices.filter((seat) => {
55
+ if (seenPrices.has(seat.price)) return false;
56
+ seenPrices.add(seat.price);
57
+ return true;
58
+ });
59
+
53
60
  return seatTypesWithPrices;
54
61
  }
55
62
 
@@ -66,7 +73,13 @@ function getUniqueSeats(seatTypes: SeatType[]) {
66
73
  }
67
74
  });
68
75
 
69
- return Array.from(seatMap.values());
76
+ const uniqueByLabel = Array.from(seatMap.values());
77
+ const seenPrices = new Set<number>();
78
+ return uniqueByLabel.filter((seat) => {
79
+ if (seenPrices.has(seat.price)) return false;
80
+ seenPrices.add(seat.price);
81
+ return true;
82
+ });
70
83
  }
71
84
 
72
85
  function getNumberOfSeats(seatTypes: SeatType[]) {
@@ -135,7 +148,14 @@ function SeatSection({
135
148
  if (isPeru) {
136
149
  return (
137
150
  <>
138
- <span className="text-[13.33px]" style={{ color: "#999" }}>
151
+ <span
152
+ className="text-[13.33px]"
153
+ style={{
154
+ color: "#999",
155
+ // position: "relative",
156
+ // bottom: numberOfSeats ? "10px" : "",
157
+ }}
158
+ >
139
159
  Antes
140
160
  </span>
141
161
  <span className="text-[13.33px]">Desde</span>
@@ -76,8 +76,8 @@ function TopAmenities({
76
76
  <div style={{ display: "flex", alignItems: "center" }}>
77
77
  <LottiePlayer
78
78
  animationData={getAnimationIcon("bombAnimation")}
79
- width="16px"
80
- height="16px"
79
+ width="20px"
80
+ height="20px"
81
81
  />
82
82
  <span
83
83
  className="flex items-center py-[10px] pl-[6px] text-white text-[13.33px] z-20"
@@ -85,7 +85,15 @@ function TopAmenities({
85
85
  >
86
86
  <span className="bold-text">kuponazo 20%&nbsp;</span> | Termina
87
87
  en&nbsp;
88
- <span className="bold-text" ref={startCountdown} />
88
+ <span
89
+ className="bold-text"
90
+ ref={startCountdown}
91
+ style={{
92
+ fontVariantNumeric: "tabular-nums",
93
+ display: "inline-block",
94
+ minWidth: "70px",
95
+ }}
96
+ />
89
97
  {/* <span className="bold-text">02:10:30</span> */}
90
98
  </span>
91
99
  </div>