kupos-ui-components-lib 9.9.2 → 9.9.4

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 (43) hide show
  1. package/dist/KuposUIComponent.d.ts +0 -3
  2. package/dist/components/ServiceItem/PeruServiceItemDesktop.d.ts +1 -1
  3. package/dist/components/ServiceItem/PeruServiceItemDesktop.js +2 -2
  4. package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
  5. package/dist/components/ServiceItem/ServiceItemDesktop.js +31 -30
  6. package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
  7. package/dist/components/ServiceItem/ServiceItemMobile.js +17 -43
  8. package/dist/components/ServiceItem/mobileTypes.d.ts +2 -48
  9. package/dist/components/ServiceItem/types.d.ts +9 -27
  10. package/dist/styles.css +6 -215
  11. package/dist/ui/ExpendedDropDown/ExpandedDropdown.d.ts +2 -1
  12. package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +5 -3
  13. package/dist/ui/OfferBanner.d.ts +0 -2
  14. package/dist/ui/OfferBanner.js +14 -19
  15. package/dist/ui/SeatSection/SeatSection.d.ts +7 -1
  16. package/dist/ui/SeatSection/SeatSection.js +41 -12
  17. package/dist/ui/mobileweb/DateTimeSectionMobile.d.ts +2 -1
  18. package/dist/ui/mobileweb/DateTimeSectionMobile.js +7 -5
  19. package/dist/ui/mobileweb/ExpandedDropdownMobile.js +1 -1
  20. package/dist/ui/mobileweb/SeatSectionMobile.d.ts +2 -1
  21. package/dist/ui/mobileweb/SeatSectionMobile.js +15 -10
  22. package/dist/utils/CommonService.d.ts +1 -4
  23. package/dist/utils/CommonService.js +6 -19
  24. package/package.json +1 -1
  25. package/src/KuposUIComponent.tsx +0 -3
  26. package/src/components/ServiceItem/PeruServiceItemDesktop.tsx +24 -35
  27. package/src/components/ServiceItem/ServiceItemDesktop.tsx +53 -65
  28. package/src/components/ServiceItem/ServiceItemMobile.tsx +290 -387
  29. package/src/components/ServiceItem/mobileTypes.ts +8 -50
  30. package/src/components/ServiceItem/types.ts +25 -39
  31. package/src/styles.css +0 -15
  32. package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +5 -3
  33. package/src/ui/OfferBanner.tsx +10 -31
  34. package/src/ui/SeatSection/SeatSection.tsx +86 -21
  35. package/src/ui/mobileweb/DateTimeSectionMobile.tsx +38 -33
  36. package/src/ui/mobileweb/ExpandedDropdownMobile.tsx +1 -1
  37. package/src/ui/mobileweb/SeatSectionMobile.tsx +12 -7
  38. package/src/utils/CommonService.ts +8 -27
  39. package/src/assets/images/anims/service_list/flame_anim.json +0 -1
  40. package/src/assets/images/anims/service_list/thunder_icon.json +0 -1
  41. package/src/assets/images/anims/service_list/users_anim.json +0 -1
  42. package/src/ui/FeaturServiceUiMobile/FeatureServiceUiMobile.tsx +0 -575
  43. package/src/ui/FeatureServiceUI/FeatureServiceUi.tsx +0 -610
@@ -9,7 +9,6 @@ import SeatSectionMobile from "../../ui/mobileweb/SeatSectionMobile";
9
9
  import DateTimeSectionMobile from "../../ui/mobileweb/DateTimeSectionMobile";
10
10
  import ExpandedDropdownMobile from "../../ui/mobileweb/ExpandedDropdownMobile";
11
11
  import ServiceBadgesMobile from "../../ui/mobileweb/ServiceBadgesMobile";
12
- import FeatureServiceUiMobile from "../../ui/FeaturServiceUiMobile/FeatureServiceUiMobile";
13
12
 
14
13
  const SEAT_EXCEPTIONS = ["Asiento mascota"];
15
14
 
@@ -46,25 +45,11 @@ function ServiceItemMobile({
46
45
  removeDuplicateSeats,
47
46
  isLinatal,
48
47
  viewersConfig,
49
- isFeatureDropDownExpand,
50
- setIsFeatureDropDownExpand,
51
- ticketQuantity,
52
- onIncreaseTicketQuantity,
53
- onDecreaseTicketQuantity,
54
- cityOrigin,
55
- cityDestination,
56
- isNewUi,
57
- onRemateUiButtonClick,
58
- selectedTimeSlot,
59
- onTimeSlotChange,
60
- isTimeDropdownOpen,
61
- onTimeDropdownToggle,
62
- wowDealData,
63
- isFlores,
48
+ operatorLabel,
49
+ isTrain,
64
50
  }: MobileServiceItemProps): React.ReactElement {
65
51
  const isItemExpanded = serviceItem.id === isExpanded;
66
52
  const isPetSeat = (Object.keys(serviceItem?.pet_seat_info) || []).length > 0;
67
- const isNewUiEnabled = serviceItem?.discounts?.[0]?.new_ui_enabled === true;
68
53
  let isSoldOut = serviceItem.available_seats <= 0;
69
54
 
70
55
  const seats = removeDuplicateSeats
@@ -89,7 +74,7 @@ function ServiceItemMobile({
89
74
  const offerGradient = `linear-gradient(90deg, ${colors.rightGradiantColor || "#ff5964"} 0%, ${colors.leftGradiantColor || "#ff8842"} 100%)`;
90
75
  const offerGradientWithOpacity = `linear-gradient(90deg, ${colors.rightGradiantColor || "#ff5964"}80 0%, ${colors.leftGradiantColor || "#ff8842"}80 100%)`;
91
76
  const serviceCardStyle: React.CSSProperties =
92
- (hasOfferText && isNewUiEnabled) || serviceItem?.is_dp_enabled
77
+ hasOfferText || serviceItem?.is_dp_enabled
93
78
  ? {
94
79
  borderColor: isSoldOut ? "#ccc" : "transparent",
95
80
  borderStyle: "solid",
@@ -170,400 +155,318 @@ function ServiceItemMobile({
170
155
  }
171
156
 
172
157
  return (
173
- <>
174
- {isNewUi ? (
175
- <FeatureServiceUiMobile
176
- serviceItem={serviceItem}
177
- showTopLabel={showTopLabel}
178
- colors={colors}
179
- isSoldOut={isSoldOut}
180
- cityOrigin={cityOrigin}
181
- cityDestination={cityDestination}
182
- renderIcon={renderIcon}
183
- viewersConfig={viewersConfig}
184
- isFeatureDropDownExpand={isFeatureDropDownExpand}
185
- ticketQuantity={ticketQuantity}
186
- onIncreaseTicketQuantity={onIncreaseTicketQuantity}
187
- onDecreaseTicketQuantity={onDecreaseTicketQuantity}
188
- onBookButtonPress={onRemateUiButtonClick}
189
- onToggleExpand={() =>
190
- setIsFeatureDropDownExpand &&
191
- setIsFeatureDropDownExpand(
192
- isFeatureDropDownExpand === serviceItem.id ||
193
- isFeatureDropDownExpand === true
194
- ? null
195
- : serviceItem.id,
196
- )
197
- }
198
- selectedTimeSlot={selectedTimeSlot}
199
- onTimeSlotChange={onTimeSlotChange}
200
- isTimeDropdownOpen={isTimeDropdownOpen}
201
- onTimeDropdownToggle={onTimeDropdownToggle}
202
- wowDealData={wowDealData}
203
- />
204
- ) : (
205
- <div
206
- className={`relative ${!serviceItem.offer_text || !serviceItem?.is_dp_enabled ? "mb-[14px]" : showTopLabel || serviceItem?.is_direct_trip ? "mb-[20px]" : "mb-[12px]"} ${
207
- serviceItem?.is_direct_trip ||
208
- isConexion ||
209
- serviceItem?.train_type_label === "Tren Express (Nuevo)" ||
210
- showTopLabel
211
- ? "mt-[20px]"
212
- : "mt-[10px]"
213
- } `}
214
- style={{ zIndex: 1 }}
215
- >
216
- <div
217
- className={`z-1 ${
218
- ((hasOfferText && isNewUiEnabled) || serviceItem?.is_dp_enabled) && !isSoldOut
219
- ? "rounded-[18px]"
220
- : "rounded-[10px] border border-[#ccc]"
221
- }`}
222
- style={{ ...serviceCardStyle, backgroundColor: "#fff" }}
223
- >
224
- <div style={{ padding: "12px 12px 8px 12px" }}>
225
- {/* Header with operator info and favorite */}
226
- <div className="flex justify-between items-center mb-[10px]">
227
- <div
228
- className="flex items-center justify-center gap-x-4"
229
- style={{
230
- marginBottom:
231
- serviceItem?.offer_text || hasDiscount ? "10px" : "",
232
- }}
233
- >
234
- <div className={`w-[115px] ${isFlores ? "" : "overflow-y-hidden"} h-[22px]`}>
235
- <img
236
- src={serviceItem.operator_details[0]}
237
- alt="service logo"
238
- className={`w-[100px] h-auto object-contain ${
239
- isSoldOut ? "grayscale" : ""
240
- }`}
241
- />
242
- </div>
243
- {isCiva ? (
244
- <div className="black-text min-[420]:text-[12px] text-[12px]">
245
- {serviceItem?.operator_details[2]}
158
+ <div
159
+ className={`relative ${!serviceItem.offer_text || !serviceItem?.is_dp_enabled ? "mb-[14px]" : showTopLabel || serviceItem?.is_direct_trip ? "mb-[20px]" : "mb-[12px]"} ${
160
+ serviceItem?.is_direct_trip ||
161
+ isConexion ||
162
+ serviceItem?.train_type_label === "Tren Express (Nuevo)" ||
163
+ showTopLabel
164
+ ? "mt-[20px]"
165
+ : "mt-[10px]"
166
+ } `}
167
+ style={{ zIndex: 1 }}
168
+ >
169
+ <div
170
+ className={`z-1 ${
171
+ (hasOfferText || serviceItem?.is_dp_enabled) && !isSoldOut
172
+ ? "rounded-[18px]"
173
+ : "rounded-[10px] border border-[#ccc]"
174
+ }`}
175
+ style={{ ...serviceCardStyle, backgroundColor: "#fff" }}
176
+ >
177
+ <div style={{ padding: "12px 12px 8px 12px" }}>
178
+ {/* Header with operator info and favorite */}
179
+ <div className="flex justify-between items-center mb-[10px]">
180
+ <div
181
+ className="flex items-center justify-center gap-x-4"
182
+ style={{
183
+ marginBottom:
184
+ serviceItem?.offer_text || hasDiscount ? "10px" : "",
185
+ }}
186
+ >
187
+ <div className="w-[115px] overflow-y-hidden h-[22px]">
188
+ <img
189
+ src={serviceItem.operator_details[0]}
190
+ alt="service logo"
191
+ className={`w-[100px] h-auto object-contain ${
192
+ isSoldOut ? "grayscale" : ""
193
+ }`}
194
+ />
195
+ </div>
196
+ {isCiva ? (
197
+ <div className="black-text min-[420]:text-[12px] text-[12px]">
198
+ {serviceItem?.operator_details[2]}
199
+ </div>
200
+ ) : showRating ? (
201
+ <div className="flex min-[420]:text-[13px] text-[12px] h-[22px] items-center">
202
+ <div className="flex items-center">
203
+ <div className="flex items-center">
204
+ <img
205
+ src={serviceItem.icons.rating}
206
+ alt="origin"
207
+ className={`w-[12px] h-[12px] mr-[4px] object-contain ${
208
+ isSoldOut ? "grayscale" : ""
209
+ }`}
210
+ />
211
+ <span style={{ lineHeight: "normal" }}>
212
+ {getServiceStars(serviceItem)}
213
+ </span>
246
214
  </div>
247
- ) : showRating ? (
248
- <div className="flex min-[420]:text-[13px] text-[12px] h-[22px] items-center">
249
- <div className="flex items-center">
250
- <div className="flex items-center">
251
- <img
252
- src={serviceItem.icons.rating}
253
- alt="origin"
254
- className={`w-[12px] h-[12px] mr-[4px] object-contain ${
255
- isSoldOut ? "grayscale" : ""
256
- }`}
257
- />
258
- <span style={{ lineHeight: "normal" }}>
259
- {getServiceStars(serviceItem)}
260
- </span>
261
- </div>
262
215
 
263
- <div
264
- className="flex items-center cursor-pointer "
265
- style={{
266
- color: isSoldOut ? "#bbb" : "text-[#464647]",
267
- }}
268
- >
269
- <span className="ml-[3px] min-[420]:text-[13px] text-[12px] text-ellipsis overflow-hidden whitespace-nowrap max-w-[120px]">
270
- {serviceItem.operator_details[2]}
271
- </span>
272
- </div>
273
- </div>
216
+ <div
217
+ className="flex items-center cursor-pointer "
218
+ style={{ color: isSoldOut ? "#bbb" : "text-[#464647]" }}
219
+ >
220
+ <span className="ml-[3px] min-[420]:text-[13px] text-[12px] text-ellipsis overflow-hidden whitespace-nowrap max-w-[120px]">
221
+ {serviceItem.operator_details[2]}
222
+ </span>
274
223
  </div>
275
- ) : null}
224
+ </div>
276
225
  </div>
277
- </div>
278
-
279
- <DateTimeSectionMobile
280
- onBookButtonPress={onBookButtonPress}
281
- isCiva={isCiva}
282
- isSoldOut={isSoldOut}
283
- isLinatal={isLinatal}
284
- isPeru={isPeru}
285
- orignLabel={orignLabel}
286
- destinationLabel={destinationLabel}
287
- originIcon={serviceItem.icons?.origin}
288
- destinationIcon={serviceItem.icons?.destination}
289
- travelDate={serviceItem.travel_date}
290
- arrivalDate={serviceItem.arrival_date}
291
- depTime={serviceItem.dep_time}
292
- arrTime={serviceItem.arr_time}
293
- seatTypes={serviceItem.seat_types}
294
- seatPriceColor={colors.seatPriceColor}
295
- tooltipBgColor={colors.tooltipBgColor}
296
- currencySign={currencySign}
297
- availableSeats={serviceItem.available_seats}
298
- removeDuplicateSeats={removeDuplicateSeats}
299
- serviceItem={serviceItem}
300
- showLastSeats={showLastSeats}
301
- discountSeatPriceColor={colors.discountSeatPriceColor}
302
- />
226
+ ) : null}
227
+ </div>
228
+ </div>
303
229
 
304
- {hasDiscount && (
305
- <div className="flex justify-end">
306
- {isSoldOut ? (
307
- <span className="col-span-2 min-[420]:text-[13px] text-right text-[12px] text-[#ccc]">
308
- Agotado
309
- </span>
310
- ) : null}
311
- </div>
312
- )}
230
+ <DateTimeSectionMobile
231
+ onBookButtonPress={onBookButtonPress}
232
+ isCiva={isCiva}
233
+ isSoldOut={isSoldOut}
234
+ isLinatal={isLinatal}
235
+ isPeru={isPeru}
236
+ orignLabel={orignLabel}
237
+ destinationLabel={destinationLabel}
238
+ originIcon={serviceItem.icons?.origin}
239
+ destinationIcon={serviceItem.icons?.destination}
240
+ travelDate={serviceItem.travel_date}
241
+ arrivalDate={serviceItem.arrival_date}
242
+ depTime={serviceItem.dep_time}
243
+ arrTime={serviceItem.arr_time}
244
+ seatTypes={serviceItem.seat_types}
245
+ seatPriceColor={colors.seatPriceColor}
246
+ tooltipBgColor={colors.tooltipBgColor}
247
+ currencySign={currencySign}
248
+ availableSeats={serviceItem.available_seats}
249
+ removeDuplicateSeats={removeDuplicateSeats}
250
+ serviceItem={serviceItem}
251
+ showLastSeats={showLastSeats}
252
+ discountSeatPriceColor={colors.discountSeatPriceColor}
253
+ isTrain={isTrain}
254
+ />
313
255
 
314
- {showLastSeats ? (
315
- <div className="flex justify-end ">
316
- {serviceItem?.available_seats < 10 &&
317
- serviceItem?.available_seats > 0 && (
318
- <div
319
- className="text-[10px] text-center"
320
- style={{
321
- color: colors.tooltipBgColor,
322
- }}
323
- >
324
- ¡Últimos Asientos!
325
- </div>
326
- )}
327
- </div>
256
+ {hasDiscount && (
257
+ <div className="flex justify-end">
258
+ {isSoldOut ? (
259
+ <span className="col-span-2 min-[420]:text-[13px] text-right text-[12px] text-[#ccc]">
260
+ Agotado
261
+ </span>
328
262
  ) : null}
263
+ </div>
264
+ )}
329
265
 
330
- {/* <div className="bg-[#E6E6E6] -ml-[12px] -mr-[12px] mt-[10px] mb-[10px] h-[1px]"></div> */}
331
- <div className="bg-[#E6E6E6] mt-[10px] mb-[8px] h-[1px]"></div>
332
-
333
- <BottomAmenitiesMobile
334
- isSoldOut={isSoldOut}
335
- amenitiesNodes={amenities()}
336
- hoursIcon={renderIcon("hours", "14px")}
337
- duration={serviceItem.duration?.toString()}
338
- isDirectTrip={serviceItem?.is_direct_trip}
339
- directoColor={colors.directoColor}
340
- directoAnim={serviceItem.icons.directoAnim}
341
- isChangeTicket={serviceItem.is_change_ticket}
342
- isPetSeat={isPetSeat}
343
- petSeatInfo={serviceItem.pet_seat_info}
344
- petFriendlyAnim={serviceItem.icons.petFriendlyAnim}
345
- flexibleAnim={serviceItem.icons.flexibleAnim}
346
- isTrackingEnabled={serviceItem?.is_tracking_enabled}
347
- locationAnim={serviceItem.icons.locationAnim}
348
- downArrowIcon={serviceItem.icons.downArrow}
349
- showDropdown={isItemExpanded}
350
- setShowDropdown={() =>
351
- setIsExpanded(isItemExpanded ? null : serviceItem.id)
352
- }
353
- onDropdownToggle={() => {
354
- setIsExpanded(isItemExpanded ? null : serviceItem.id);
355
- }}
356
- isPeru={isPeru}
357
- femaleAnim={serviceItem.icons.femaleAnim}
358
- ladiesBookedSeats={serviceItem.ladies_booked_seats}
359
- isDpEnabled={serviceItem.is_dp_enabled}
360
- />
266
+ {showLastSeats ? (
267
+ <div className="flex justify-end ">
268
+ {serviceItem?.available_seats < 10 &&
269
+ serviceItem?.available_seats > 0 && (
270
+ <div
271
+ className="text-[10px] text-center"
272
+ style={{
273
+ color: colors.tooltipBgColor,
274
+ }}
275
+ >
276
+ ¡Últimos Asientos!
277
+ </div>
278
+ )}
361
279
  </div>
280
+ ) : null}
362
281
 
363
- <ServiceBadgesMobile
364
- showTopLabel={showTopLabel}
365
- isSoldOut={isSoldOut}
366
- colors={colors}
367
- renderIcon={renderIcon}
368
- serviceItem={serviceItem}
369
- isConexion={isConexion}
370
- />
371
- </div>
282
+ {/* <div className="bg-[#E6E6E6] -ml-[12px] -mr-[12px] mt-[10px] mb-[10px] h-[1px]"></div> */}
283
+ <div className="bg-[#E6E6E6] mt-[10px] mb-[8px] h-[1px]"></div>
372
284
 
373
- {/* 🔹 EXPANDABLE DROPDOWN (below the card) */}
374
- {((serviceItem?.offer_text && !isNewUiEnabled)) &&
375
- !isSoldOut && (
376
- <div
377
- className="px-[12px] pt-[22px] pb-[8px] relative -z-9 -mt-[15px]"
378
- style={{
379
- background: colors?.bottomStripColor,
380
- borderRadius: "0 0 14px 14px",
381
- zIndex: -1,
382
- }}
383
- >
384
- <div
385
- className="flex flex-col gap-[8px] text-[12px] min-[420px]:text-[12px] text-[#464647]"
386
- style={{ lineHeight: 1.6 }}
387
- >
388
- <div className="flex justify-between items-center">
389
- <div
390
- className={`flex ${(serviceItem?.offer_text || "").length > 10 ? "items-start" : "items-center"}`}
391
- >
392
- <div className={isLongOfferText ? "mt-[2px]" : ""}>
393
- <LottiePlayer
394
- animationData={serviceItem.icons.promoAnim}
395
- width="14px"
396
- height="14px"
397
- />
398
- </div>
399
- <div
400
- className={`ml-[4px] flex-1 outline-none ${isLongOfferText ? "mt-[2px]" : ""}`}
401
- style={{
402
- color: "#fff",
403
- lineHeight: 1.4,
404
- }}
405
- >
406
- <span className="whitespace-nowrap min-[380px]:text-[12px]">
407
- {serviceItem?.offer_text}
408
- </span>
409
- </div>
410
- </div>
411
- </div>
412
- </div>
413
- </div>
414
- )}
285
+ <BottomAmenitiesMobile
286
+ isSoldOut={isSoldOut}
287
+ amenitiesNodes={amenities()}
288
+ hoursIcon={renderIcon("hours", "14px")}
289
+ duration={serviceItem.duration?.toString()}
290
+ isDirectTrip={serviceItem?.is_direct_trip}
291
+ directoColor={colors.directoColor}
292
+ directoAnim={serviceItem.icons.directoAnim}
293
+ isChangeTicket={serviceItem.is_change_ticket}
294
+ isPetSeat={isPetSeat}
295
+ petSeatInfo={serviceItem.pet_seat_info}
296
+ petFriendlyAnim={serviceItem.icons.petFriendlyAnim}
297
+ flexibleAnim={serviceItem.icons.flexibleAnim}
298
+ isTrackingEnabled={serviceItem?.is_tracking_enabled}
299
+ locationAnim={serviceItem.icons.locationAnim}
300
+ downArrowIcon={serviceItem.icons.downArrow}
301
+ showDropdown={isItemExpanded}
302
+ setShowDropdown={() =>
303
+ setIsExpanded(isItemExpanded ? null : serviceItem.id)
304
+ }
305
+ onDropdownToggle={() => {
306
+ setIsExpanded(isItemExpanded ? null : serviceItem.id);
307
+ }}
308
+ isPeru={isPeru}
309
+ femaleAnim={serviceItem.icons.femaleAnim}
310
+ ladiesBookedSeats={serviceItem.ladies_booked_seats}
311
+ isDpEnabled={serviceItem.is_dp_enabled}
312
+ />
313
+ </div>
415
314
 
416
- {/* 🔹 EXPANDABLE DROPDOWN (below the card) */}
417
- {((serviceItem?.offer_text && isNewUiEnabled) || serviceItem?.is_dp_enabled) &&
418
- !isSoldOut && (
419
- <div
420
- className="px-[12px] pt-[22px] pb-[8px] relative -z-9 -mt-[15px]"
421
- style={{
422
- background: isSoldOut
423
- ? offerGradientWithOpacity
424
- : offerGradient,
425
- // opacity: isSoldOut ? 0.5 : 1,
426
- borderRadius: "0 0 14px 14px",
427
- zIndex: -1,
428
- }}
429
- >
430
- <div
431
- className="flex flex-col gap-[8px] text-[12px] min-[420px]:text-[12px] text-[#464647]"
432
- style={{ lineHeight: 1.6 }}
433
- >
434
- <div className="flex justify-between items-center">
435
- {serviceItem?.is_dp_enabled &&
436
- Object.keys(serviceItem?.dp_discount_percents ?? {})
437
- .length === 0 &&
438
- (serviceItem?.dp_discounted_seats ?? []).length === 0 ? (
439
- <div className="flex items-center gap-[6px]">
440
- {/* {renderIcon("whiteFireIcon", "14px")} */}
441
- <LottiePlayer
442
- animationData={serviceItem.icons.starAnimation}
443
- width="14px"
444
- height="14px"
445
- />
315
+ <ServiceBadgesMobile
316
+ showTopLabel={showTopLabel}
317
+ isSoldOut={isSoldOut}
318
+ colors={colors}
319
+ renderIcon={renderIcon}
320
+ serviceItem={serviceItem}
321
+ isConexion={isConexion}
322
+ />
323
+ </div>
446
324
 
447
- <span className="text-[#fff]">Más elegido</span>
448
- </div>
449
- ) : (
450
- <div
451
- className={`flex ${(serviceItem?.offer_text || "").length > 10 ? "items-start" : "items-center"}`}
452
- >
453
- <div className={isLongOfferText ? "mt-[2px]" : ""}>
454
- <LottiePlayer
455
- animationData={serviceItem.icons.bombAnim}
456
- width="14px"
457
- height="14px"
458
- />
459
- </div>
460
- <div
461
- className={`ml-[4px] flex-1 outline-none ${isLongOfferText ? "mt-[2px]" : ""}`}
462
- style={{
463
- color: "#fff",
464
- lineHeight: 1.4,
465
- }}
466
- >
467
- <span className="whitespace-nowrap min-[380px]:text-[12px]">
468
- Termina en&nbsp;
469
- <span
470
- className="bold-text"
471
- ref={(node) =>
472
- commonService.startCountdown(node, 599)
473
- }
474
- style={{
475
- fontVariantNumeric: "tabular-nums",
476
- display: "inline-block",
477
- }}
478
- />
479
- </span>
480
- </div>
481
- </div>
482
- )}
325
+ {/* 🔹 EXPANDABLE DROPDOWN (below the card) */}
326
+ {(serviceItem?.offer_text || serviceItem?.is_dp_enabled) &&
327
+ !isSoldOut && (
328
+ <div
329
+ className="px-[12px] pt-[22px] pb-[8px] relative -z-9 -mt-[15px]"
330
+ style={{
331
+ background: isSoldOut ? offerGradientWithOpacity : offerGradient,
332
+ // opacity: isSoldOut ? 0.5 : 1,
333
+ borderRadius: "0 0 14px 14px",
334
+ zIndex: -1,
335
+ }}
336
+ >
337
+ <div
338
+ className="flex flex-col gap-[8px] text-[12px] min-[420px]:text-[12px] text-[#464647]"
339
+ style={{ lineHeight: 1.6 }}
340
+ >
341
+ <div className="flex justify-between items-center">
342
+ {serviceItem?.is_dp_enabled &&
343
+ Object.keys(serviceItem?.dp_discount_percents ?? {}).length ===
344
+ 0 &&
345
+ (serviceItem?.dp_discounted_seats ?? []).length === 0 ? (
346
+ <div className="flex items-center gap-[6px]">
347
+ {/* {renderIcon("whiteFireIcon", "14px")} */}
348
+ <LottiePlayer
349
+ animationData={serviceItem.icons.starAnimation}
350
+ width="14px"
351
+ height="14px"
352
+ />
353
+
354
+ <span className="text-[#fff]">Más elegido</span>
355
+ </div>
356
+ ) : (
357
+ <div
358
+ className={`flex ${(serviceItem?.offer_text || "").length > 10 ? "items-start" : "items-center"}`}
359
+ >
360
+ <div className={isLongOfferText ? "mt-[2px]" : ""}>
361
+ <LottiePlayer
362
+ animationData={serviceItem.icons.bombAnim}
363
+ width="14px"
364
+ height="14px"
365
+ />
366
+ </div>
483
367
  <div
484
- className="flex flex-col items-end"
368
+ className={`ml-[4px] flex-1 outline-none ${isLongOfferText ? "mt-[2px]" : ""}`}
485
369
  style={{
486
370
  color: "#fff",
371
+ lineHeight: 1.4,
487
372
  }}
488
373
  >
489
- <div className="flex items-center">
490
- <div className="mr-[4px]">
491
- {" "}
492
- <LottiePlayer
493
- animationData={serviceItem.icons.dotAnimation}
494
- width="12px"
495
- height="12px"
496
- />
497
- </div>
498
- <span className="flex-1" style={{ lineHeight: 1.4 }}>
499
- <span
500
- className="bold-text"
501
- ref={(node) =>
502
- commonService.startViewerCount(
503
- node,
504
- viewersConfig,
505
- )
506
- }
507
- style={{ fontVariantNumeric: "tabular-nums" }}
508
- />{" "}
509
- <span> viendo</span> |{" "}
510
- <span className="whitespace-nowrap">
511
- {/* {serviceItem?.is_dp_enabled ? null : "Quedan pocos • "} */}
512
- <span
513
- className="bold-text"
514
- ref={(node) =>
515
- commonService.startComprandoCount(node, 4, 16)
516
- }
517
- style={{ fontVariantNumeric: "tabular-nums" }}
518
- />{" "}
519
- comprando
520
- </span>
521
- </span>
522
- </div>
374
+ <span className="whitespace-nowrap min-[380px]:text-[12px]">
375
+ Termina en&nbsp;
376
+ <span
377
+ className="bold-text"
378
+ ref={(node) =>
379
+ commonService.startCountdown(node, 599)
380
+ }
381
+ style={{
382
+ fontVariantNumeric: "tabular-nums",
383
+ display: "inline-block",
384
+ }}
385
+ />
386
+ </span>
387
+ </div>
388
+ </div>
389
+ )}
390
+ <div
391
+ className="flex flex-col items-end"
392
+ style={{
393
+ color: "#fff",
394
+ }}
395
+ >
396
+ <div className="flex items-center">
397
+ <div className="mr-[4px]">
398
+ {" "}
399
+ <LottiePlayer
400
+ animationData={serviceItem.icons.dotAnimation}
401
+ width="12px"
402
+ height="12px"
403
+ />
523
404
  </div>
405
+ <span className="flex-1" style={{ lineHeight: 1.4 }}>
406
+ <span
407
+ className="bold-text"
408
+ ref={(node) =>
409
+ commonService.startViewerCount(node, viewersConfig)
410
+ }
411
+ style={{ fontVariantNumeric: "tabular-nums" }}
412
+ />{" "}
413
+ <span> viendo</span> |{" "}
414
+ <span className="whitespace-nowrap">
415
+ {/* {serviceItem?.is_dp_enabled ? null : "Quedan pocos • "} */}
416
+ <span
417
+ className="bold-text"
418
+ ref={(node) =>
419
+ commonService.startComprandoCount(node, 4, 16)
420
+ }
421
+ style={{ fontVariantNumeric: "tabular-nums" }}
422
+ />{" "}
423
+ comprando
424
+ </span>
425
+ </span>
524
426
  </div>
525
427
  </div>
526
428
  </div>
527
- )}
528
- <div
529
- style={{
530
- display: "grid",
531
- gridTemplateRows: isItemExpanded ? "1fr" : "0fr",
532
- opacity: isItemExpanded ? 1 : 0,
533
- transition:
534
- "grid-template-rows 0.3s ease-in-out, opacity 0.25s ease-in-out",
535
- position: "relative",
536
- zIndex:
537
- serviceItem?.offer_text || serviceItem?.is_dp_enabled ? -2 : -1,
538
- }}
539
- >
540
- <div
541
- style={{
542
- overflow: "hidden",
543
- minHeight: 0,
544
- position: serviceItem?.offer_text ? "relative" : undefined,
545
- zIndex: serviceItem?.offer_text ? -3 : undefined,
546
- marginTop: serviceItem?.offer_text ? "-15px" : "-10px",
547
- }}
548
- >
549
- <ExpandedDropdownMobile
550
- serviceItem={serviceItem}
551
- isPeru={isPeru}
552
- petSeatInfo={serviceItem.pet_seat_info}
553
- petFriendlyAnim={serviceItem.icons.petFriendlyAnim}
554
- isSoldOut={isSoldOut}
555
- isChangeTicket={serviceItem.is_change_ticket === true}
556
- ladiesBookedSeats={serviceItem.ladies_booked_seats}
557
- isDpEnabled={serviceItem.is_dp_enabled}
558
- femaleAnim={serviceItem.icons.femaleAnim}
559
- flexibleAnim={serviceItem.icons.flexibleAnim}
560
- renderIcon={renderIcon}
561
- />
562
429
  </div>
563
430
  </div>
431
+ )}
432
+ <div
433
+ style={{
434
+ display: "grid",
435
+ gridTemplateRows: isItemExpanded ? "1fr" : "0fr",
436
+ opacity: isItemExpanded ? 1 : 0,
437
+ transition:
438
+ "grid-template-rows 0.3s ease-in-out, opacity 0.25s ease-in-out",
439
+ position: "relative",
440
+ zIndex:
441
+ serviceItem?.offer_text || serviceItem?.is_dp_enabled ? -2 : -1,
442
+ }}
443
+ >
444
+ <div
445
+ style={{
446
+ overflow: "hidden",
447
+ minHeight: 0,
448
+ position: serviceItem?.offer_text ? "relative" : undefined,
449
+ zIndex: serviceItem?.offer_text ? -3 : undefined,
450
+ marginTop: serviceItem?.offer_text ? "-15px" : "-10px",
451
+ }}
452
+ >
453
+ <ExpandedDropdownMobile
454
+ serviceItem={serviceItem}
455
+ isPeru={isPeru}
456
+ petSeatInfo={serviceItem.pet_seat_info}
457
+ petFriendlyAnim={serviceItem.icons.petFriendlyAnim}
458
+ isSoldOut={isSoldOut}
459
+ isChangeTicket={serviceItem.is_change_ticket === true}
460
+ ladiesBookedSeats={serviceItem.ladies_booked_seats}
461
+ isDpEnabled={serviceItem.is_dp_enabled}
462
+ femaleAnim={serviceItem.icons.femaleAnim}
463
+ flexibleAnim={serviceItem.icons.flexibleAnim}
464
+ renderIcon={renderIcon}
465
+ operatorLabel={operatorLabel}
466
+ />
564
467
  </div>
565
- )}
566
- </>
468
+ </div>
469
+ </div>
567
470
  );
568
471
  }
569
472