kupos-ui-components-lib 9.3.1 → 9.3.3

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 (41) hide show
  1. package/dist/assets/images/anims/service_list/60_percent_anim.json +1 -0
  2. package/dist/assets/images/anims/service_list/dot_animation.json +1 -0
  3. package/dist/assets/images/anims/service_list/thunder_icon.json +1 -0
  4. package/dist/components/ServiceItem/ServiceItemDesktop.js +50 -121
  5. package/dist/components/ServiceItem/ServiceItemMobile.js +44 -105
  6. package/dist/components/ServiceItem/mobileTypes.d.ts +3 -0
  7. package/dist/components/ServiceItem/types.d.ts +2 -0
  8. package/dist/styles.css +125 -23
  9. package/dist/types.d.ts +2 -0
  10. package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +16 -19
  11. package/dist/ui/FeatureServiceUI/FeatureServiceUi.d.ts +12 -0
  12. package/dist/ui/FeatureServiceUI/FeatureServiceUi.js +101 -0
  13. package/dist/ui/SeatSection/SeatSection.d.ts +2 -1
  14. package/dist/ui/SeatSection/SeatSection.js +41 -10
  15. package/dist/ui/ServiceBadges/ServiceBadges.d.ts +17 -0
  16. package/dist/ui/ServiceBadges/ServiceBadges.js +33 -0
  17. package/dist/ui/mobileweb/DateTimeSectionMobile.d.ts +2 -1
  18. package/dist/ui/mobileweb/DateTimeSectionMobile.js +2 -2
  19. package/dist/ui/mobileweb/ExpandedDropdownMobile.js +18 -18
  20. package/dist/ui/mobileweb/SeatSectionMobile.d.ts +2 -1
  21. package/dist/ui/mobileweb/SeatSectionMobile.js +28 -16
  22. package/dist/ui/mobileweb/ServiceBadgesMobile.d.ts +17 -0
  23. package/dist/ui/mobileweb/ServiceBadgesMobile.js +35 -0
  24. package/dist/utils/CommonService.d.ts +7 -0
  25. package/dist/utils/CommonService.js +61 -0
  26. package/package.json +1 -1
  27. package/src/assets/images/anims/service_list/dot_animation.json +1 -0
  28. package/src/components/ServiceItem/ServiceItemDesktop.tsx +93 -235
  29. package/src/components/ServiceItem/ServiceItemMobile.tsx +118 -166
  30. package/src/components/ServiceItem/mobileTypes.ts +3 -0
  31. package/src/components/ServiceItem/types.ts +2 -0
  32. package/src/styles.css +10 -0
  33. package/src/types.ts +2 -0
  34. package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +26 -67
  35. package/src/ui/SeatSection/SeatSection.tsx +87 -32
  36. package/src/ui/ServiceBadges/ServiceBadges.tsx +92 -0
  37. package/src/ui/mobileweb/DateTimeSectionMobile.tsx +3 -0
  38. package/src/ui/mobileweb/ExpandedDropdownMobile.tsx +24 -24
  39. package/src/ui/mobileweb/SeatSectionMobile.tsx +77 -32
  40. package/src/ui/mobileweb/ServiceBadgesMobile.tsx +92 -0
  41. package/src/utils/CommonService.ts +86 -0
package/dist/styles.css CHANGED
@@ -27,14 +27,14 @@
27
27
  .-top-\[8px\] {
28
28
  top: calc(8px * -1);
29
29
  }
30
+ .-top-\[9px\] {
31
+ top: calc(9px * -1);
32
+ }
30
33
  .-top-\[11px\] {
31
34
  top: calc(11px * -1);
32
35
  }
33
- .-top-\[14px\] {
34
- top: calc(14px * -1);
35
- }
36
- .-top-\[16px\] {
37
- top: calc(16px * -1);
36
+ .-top-\[18px\] {
37
+ top: calc(18px * -1);
38
38
  }
39
39
  .top-\[2px\] {
40
40
  top: 2px;
@@ -54,9 +54,6 @@
54
54
  .top-\[88\%\] {
55
55
  top: 88%;
56
56
  }
57
- .right-\[0\] {
58
- right: 0;
59
- }
60
57
  .right-\[0px\] {
61
58
  right: 0px;
62
59
  }
@@ -123,6 +120,24 @@
123
120
  .z-\[1\] {
124
121
  z-index: 1;
125
122
  }
123
+ .col-span-2 {
124
+ grid-column: span 2 / span 2;
125
+ }
126
+ .col-start-1 {
127
+ grid-column-start: 1;
128
+ }
129
+ .col-start-2 {
130
+ grid-column-start: 2;
131
+ }
132
+ .row-start-1 {
133
+ grid-row-start: 1;
134
+ }
135
+ .row-start-2 {
136
+ grid-row-start: 2;
137
+ }
138
+ .row-start-3 {
139
+ grid-row-start: 3;
140
+ }
126
141
  .container {
127
142
  width: 100%;
128
143
  }
@@ -159,9 +174,6 @@
159
174
  .mt-\[13px\] {
160
175
  margin-top: 13px;
161
176
  }
162
- .mt-\[14px\] {
163
- margin-top: 14px;
164
- }
165
177
  .mt-\[15px\] {
166
178
  margin-top: 15px;
167
179
  }
@@ -240,9 +252,6 @@
240
252
  .ml-\[6px\] {
241
253
  margin-left: 6px;
242
254
  }
243
- .ml-\[8px\] {
244
- margin-left: 8px;
245
- }
246
255
  .ml-\[10px\] {
247
256
  margin-left: 10px;
248
257
  }
@@ -424,6 +433,9 @@
424
433
  .rotate-180 {
425
434
  rotate: 180deg;
426
435
  }
436
+ .transform {
437
+ transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
438
+ }
427
439
  .cursor-default {
428
440
  cursor: default;
429
441
  }
@@ -445,6 +457,9 @@
445
457
  .grid-cols-\[26px_auto_26\%_1fr\] {
446
458
  grid-template-columns: 26px auto 26% 1fr;
447
459
  }
460
+ .grid-cols-\[auto_auto\] {
461
+ grid-template-columns: auto auto;
462
+ }
448
463
  .flex-col {
449
464
  flex-direction: column;
450
465
  }
@@ -460,6 +475,9 @@
460
475
  .items-center {
461
476
  align-items: center;
462
477
  }
478
+ .items-end {
479
+ align-items: flex-end;
480
+ }
463
481
  .items-start {
464
482
  align-items: flex-start;
465
483
  }
@@ -472,6 +490,9 @@
472
490
  .justify-end {
473
491
  justify-content: flex-end;
474
492
  }
493
+ .justify-start {
494
+ justify-content: flex-start;
495
+ }
475
496
  .gap-\[1px\] {
476
497
  gap: 1px;
477
498
  }
@@ -509,6 +530,10 @@
509
530
  -moz-column-gap: 2%;
510
531
  column-gap: 2%;
511
532
  }
533
+ .gap-x-\[8px\] {
534
+ -moz-column-gap: 8px;
535
+ column-gap: 8px;
536
+ }
512
537
  .overflow-hidden {
513
538
  overflow: hidden;
514
539
  }
@@ -527,12 +552,18 @@
527
552
  .rounded-\[15px\] {
528
553
  border-radius: 15px;
529
554
  }
555
+ .rounded-\[18px\] {
556
+ border-radius: 18px;
557
+ }
530
558
  .rounded-\[20px\] {
531
559
  border-radius: 20px;
532
560
  }
533
561
  .rounded-\[38px\] {
534
562
  border-radius: 38px;
535
563
  }
564
+ .rounded-\[100px\] {
565
+ border-radius: 100px;
566
+ }
536
567
  .rounded-full {
537
568
  border-radius: calc(infinity * 1px);
538
569
  }
@@ -638,6 +669,9 @@
638
669
  .bg-\[\#ff8f45\] {
639
670
  background-color: #ff8f45;
640
671
  }
672
+ .bg-\[\#ff5964\] {
673
+ background-color: #ff5964;
674
+ }
641
675
  .bg-\[\#fff\] {
642
676
  background-color: #fff;
643
677
  }
@@ -678,6 +712,12 @@
678
712
  .p-\[30px_20px\] {
679
713
  padding: 30px 20px;
680
714
  }
715
+ .px-\[6px\] {
716
+ padding-inline: 6px;
717
+ }
718
+ .px-\[8px\] {
719
+ padding-inline: 8px;
720
+ }
681
721
  .px-\[10px\] {
682
722
  padding-inline: 10px;
683
723
  }
@@ -735,12 +775,15 @@
735
775
  .pt-\[50px\] {
736
776
  padding-top: 50px;
737
777
  }
738
- .pr-\[13px\] {
739
- padding-right: 13px;
740
- }
741
778
  .pr-\[15px\] {
742
779
  padding-right: 15px;
743
780
  }
781
+ .pr-\[20px\] {
782
+ padding-right: 20px;
783
+ }
784
+ .pr-\[22px\] {
785
+ padding-right: 22px;
786
+ }
744
787
  .pb-\[7px\] {
745
788
  padding-bottom: 7px;
746
789
  }
@@ -771,6 +814,9 @@
771
814
  .text-left {
772
815
  text-align: left;
773
816
  }
817
+ .text-right {
818
+ text-align: right;
819
+ }
774
820
  .text-\[10px\] {
775
821
  font-size: 10px;
776
822
  }
@@ -798,6 +844,12 @@
798
844
  .text-\[17px\] {
799
845
  font-size: 17px;
800
846
  }
847
+ .text-\[18px\] {
848
+ font-size: 18px;
849
+ }
850
+ .text-\[22px\] {
851
+ font-size: 22px;
852
+ }
801
853
  .text-\[42px\] {
802
854
  font-size: 42px;
803
855
  }
@@ -805,6 +857,22 @@
805
857
  --tw-leading: 1.3;
806
858
  line-height: 1.3;
807
859
  }
860
+ .leading-\[20px\] {
861
+ --tw-leading: 20px;
862
+ line-height: 20px;
863
+ }
864
+ .leading-\[22px\] {
865
+ --tw-leading: 22px;
866
+ line-height: 22px;
867
+ }
868
+ .leading-\[24px\] {
869
+ --tw-leading: 24px;
870
+ line-height: 24px;
871
+ }
872
+ .leading-\[30px\] {
873
+ --tw-leading: 30px;
874
+ line-height: 30px;
875
+ }
808
876
  .leading-none {
809
877
  --tw-leading: 1;
810
878
  line-height: 1;
@@ -830,15 +898,18 @@
830
898
  .whitespace-nowrap {
831
899
  white-space: nowrap;
832
900
  }
901
+ .text-\[\#9f9f9f\] {
902
+ color: #9f9f9f;
903
+ }
833
904
  .text-\[\#464647\] {
834
905
  color: #464647;
835
906
  }
836
- .text-\[\#bbb\] {
837
- color: #bbb;
838
- }
839
907
  .text-\[\#c0c0c0\] {
840
908
  color: #c0c0c0;
841
909
  }
910
+ .text-\[\#c2c2c2\] {
911
+ color: #c2c2c2;
912
+ }
842
913
  .text-\[\#ccc\] {
843
914
  color: #ccc;
844
915
  }
@@ -905,9 +976,6 @@
905
976
  --tw-outline-style: none;
906
977
  outline-style: none;
907
978
  }
908
- .\[rid-template-columns\:18\%_28\%_2\.5\%_28\%_15\.5\%\] {
909
- rid-template-columns: 18% 28% 2.5% 28% 15.5%;
910
- }
911
979
  .group-hover\:block {
912
980
  &:is(:where(.group):hover *) {
913
981
  @media (hover: hover) {
@@ -1016,6 +1084,15 @@
1016
1084
  transform: translateY(0);
1017
1085
  }
1018
1086
  }
1087
+ @keyframes pulse-zoom {
1088
+ 0%,
1089
+ 100% {
1090
+ transform: scale(1);
1091
+ }
1092
+ 50% {
1093
+ transform: scale(1.05);
1094
+ }
1095
+ }
1019
1096
  .hide-scrollbar::-webkit-scrollbar {
1020
1097
  display: none;
1021
1098
  }
@@ -1038,6 +1115,26 @@
1038
1115
  inherits: false;
1039
1116
  initial-value: 0;
1040
1117
  }
1118
+ @property --tw-rotate-x {
1119
+ syntax: "*";
1120
+ inherits: false;
1121
+ }
1122
+ @property --tw-rotate-y {
1123
+ syntax: "*";
1124
+ inherits: false;
1125
+ }
1126
+ @property --tw-rotate-z {
1127
+ syntax: "*";
1128
+ inherits: false;
1129
+ }
1130
+ @property --tw-skew-x {
1131
+ syntax: "*";
1132
+ inherits: false;
1133
+ }
1134
+ @property --tw-skew-y {
1135
+ syntax: "*";
1136
+ inherits: false;
1137
+ }
1041
1138
  @property --tw-border-style {
1042
1139
  syntax: "*";
1043
1140
  inherits: false;
@@ -1149,6 +1246,11 @@
1149
1246
  --tw-translate-x: 0;
1150
1247
  --tw-translate-y: 0;
1151
1248
  --tw-translate-z: 0;
1249
+ --tw-rotate-x: initial;
1250
+ --tw-rotate-y: initial;
1251
+ --tw-rotate-z: initial;
1252
+ --tw-skew-x: initial;
1253
+ --tw-skew-y: initial;
1152
1254
  --tw-border-style: solid;
1153
1255
  --tw-leading: initial;
1154
1256
  --tw-font-weight: initial;
package/dist/types.d.ts CHANGED
@@ -105,6 +105,8 @@ export interface ServiceItemProps {
105
105
  wifiIcon?: string;
106
106
  cortinaIcon?: string;
107
107
  frazaIcon?: string;
108
+ specialDeparture?: string;
109
+ fireIcon?: string;
108
110
  [key: string]: string | Record<string, string | undefined> | undefined;
109
111
  };
110
112
  useLottieFor?: string[];
@@ -6,26 +6,12 @@ function ExpandedDropdown({ serviceItem, isPeru = false, translation = {}, getAn
6
6
  return (React.createElement("div", { className: "px-[15px] pt-[26px] pb-[14px] -mt-[16px] pt-[35px] relative -z-9", style: {
7
7
  backgroundColor: "#ffefef",
8
8
  borderRadius: "0 0 10px 10px",
9
- // border: showPromo ? `1px solid ${colors.priceColor}` : "1px solid #ccc",
10
- // border: `1px solid ${colors.priceColor}`,
11
- // borderTop: "none",
12
9
  } },
13
- React.createElement("div", { className: "flex flex-col gap-[10px] text-[13px] text-[#464647]", style: { lineHeight: 1.6 } },
14
- hasPetInfo && (React.createElement("div", { className: "flex items-center gap-[10px]" },
15
- React.createElement(LottiePlayer, { animationData: getAnimationIcon("petFriendlyAnim"), width: "20px", height: "20px" }),
16
- React.createElement("div", { className: "h-auto mr-[4px] text-[13px] text-[#464647] bold-text" },
17
- React.createElement("span", null, translation === null || translation === void 0 ? void 0 : translation.petFriendly)))),
18
- React.createElement("div", { className: "flex gap-[8px] text-[13.33px]" },
19
- React.createElement("span", { style: { marginTop: "2px" } }, "\u2022"),
20
- React.createElement("span", null,
21
- React.createElement("span", { className: "bold-text" }, "Pol\u00EDticas de anulaci\u00F3n:"),
22
- " Tu pasaje puede ser anulado de forma online",
23
- React.createElement("span", { className: "bold-text" }, " hasta 4 horas antes"),
24
- " antes de la salida del bus.")),
25
- isPeru ? null : isChangeTicket ? (React.createElement("div", { className: "flex gap-[8px]" },
10
+ React.createElement("div", { className: "flex flex-col gap-[6px] text-[13px] text-[#464647]", style: { lineHeight: 1.5 } },
11
+ isPeru ? null : isChangeTicket ? (React.createElement("div", { className: "flex gap-[8px]", style: { lineHeight: 1.5 } },
26
12
  React.createElement("span", { style: { marginTop: "2px" } }, "\u2022"),
27
13
  React.createElement("span", null,
28
- React.createElement("span", { className: "bold-text" }, "Pol\u00EDticas de cambios:"),
14
+ React.createElement("span", { className: "bold-text" }, "Pasaje flexible:"),
29
15
  " Tu pasaje puede ser cambiado de manera online",
30
16
  " ",
31
17
  React.createElement("span", { className: "bold-text" },
@@ -37,7 +23,18 @@ function ExpandedDropdown({ serviceItem, isPeru = false, translation = {}, getAn
37
23
  React.createElement("span", { style: { marginTop: "2px" } }, "\u2022"),
38
24
  React.createElement("span", null,
39
25
  React.createElement("span", null,
40
- React.createElement("span", { className: "bold-text" }, "Pol\u00EDtica de cambios:"),
41
- " Esta empresa no permite cambios de pasajes")))))));
26
+ React.createElement("span", { className: "bold-text" }, "Pasaje flexible:"),
27
+ " Esta empresa no permite cambios de pasajes.")))),
28
+ hasPetInfo && (React.createElement("div", { className: "flex items-center gap-[10px]" },
29
+ React.createElement(LottiePlayer, { animationData: getAnimationIcon("petFriendlyAnim"), width: "20px", height: "20px" }),
30
+ React.createElement("div", { className: "h-auto mr-[4px] text-[13px] text-[#464647] bold-text" },
31
+ React.createElement("span", null, translation === null || translation === void 0 ? void 0 : translation.petFriendly)))),
32
+ React.createElement("div", { className: "flex gap-[8px] text-[13.33px]" },
33
+ React.createElement("span", { style: { marginTop: "2px" } }, "\u2022"),
34
+ React.createElement("span", null,
35
+ React.createElement("span", { className: "bold-text" }, "Pol\u00EDticas de anulaci\u00F3n:"),
36
+ " Tu pasaje puede ser anulado de forma online",
37
+ React.createElement("span", { className: "bold-text" }, " hasta 4 horas antes"),
38
+ " antes de la salida del bus.")))));
42
39
  }
43
40
  export default ExpandedDropdown;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ declare const FeatureServiceUi: ({ serviceItem, showTopLabel, colors, isSoldOut, getAnimationIcon, cityOrigin, cityDestination, renderIcon, }: {
3
+ serviceItem: any;
4
+ showTopLabel: any;
5
+ colors: any;
6
+ isSoldOut: any;
7
+ getAnimationIcon: any;
8
+ cityOrigin: any;
9
+ cityDestination: any;
10
+ renderIcon: any;
11
+ }) => React.JSX.Element;
12
+ export default FeatureServiceUi;
@@ -0,0 +1,101 @@
1
+ import React from "react";
2
+ import LottiePlayer from "../../assets/LottiePlayer";
3
+ const HARDCODED_OPERATORS = [
4
+ {
5
+ logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Turbus_logo.svg/320px-Turbus_logo.svg.png",
6
+ name: "Turbus",
7
+ },
8
+ {
9
+ logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Pullman_Bus_logo.svg/320px-Pullman_Bus_logo.svg.png",
10
+ name: "Pullmanbus",
11
+ },
12
+ {
13
+ logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Turbus_logo.svg/320px-Turbus_logo.svg.png",
14
+ name: "Expreso Santa C...",
15
+ },
16
+ ];
17
+ const HARDCODED_COUNTDOWN = "09:55";
18
+ const FeatureServiceUi = ({ serviceItem, showTopLabel, colors, isSoldOut, getAnimationIcon, cityOrigin, cityDestination, renderIcon, }) => {
19
+ var _a, _b, _c, _d, _e, _f, _g;
20
+ const operators = ((_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.operators) === null || _a === void 0 ? void 0 : _a.length) > 0
21
+ ? serviceItem.operators
22
+ : HARDCODED_OPERATORS;
23
+ return (React.createElement("div", { className: `relative ${serviceItem.offer_text ? "mb-[55px]" : "mb-[10px]"} ${(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) ||
24
+ (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" ||
25
+ showTopLabel
26
+ ? "mt-[24px]"
27
+ : "mt-[20px]"}` },
28
+ React.createElement("div", null,
29
+ React.createElement("div", { id: `service-card-${serviceItem.id}`, className: "bg-[#0C1421] text-white mx-auto relative rounded-[14px] p-[14px] text-[13.33px]" },
30
+ React.createElement("div", { className: "grid grid-cols-[1.3fr_2fr_1.2fr] gap-[16px] items-stretch" },
31
+ React.createElement("div", { className: "flex flex-col justify-between gap-[20px] py-[2px]" },
32
+ React.createElement("div", { className: "flex flex-col gap-[8px]" },
33
+ React.createElement("div", { className: "flex items-center gap-[8px]" },
34
+ React.createElement("img", { src: (_b = serviceItem.icons) === null || _b === void 0 ? void 0 : _b.whiteOrigin, alt: "origin", className: `w-[14px] h-[14px] shrink-0 ${isSoldOut ? "grayscale" : ""}` }),
35
+ React.createElement("span", { className: "text-[13px] bold-text" }, cityOrigin === null || cityOrigin === void 0 ? void 0 : cityOrigin.label.split(",")[0])),
36
+ React.createElement("div", { className: "flex items-center gap-[8px]" },
37
+ React.createElement("img", { src: (_c = serviceItem.icons) === null || _c === void 0 ? void 0 : _c.whiteDestination, alt: "destination", className: `w-[16px] h-[16px] shrink-0 ${isSoldOut ? "grayscale" : ""}`, style: { opacity: isSoldOut ? 0.5 : 1 } }),
38
+ React.createElement("span", { className: "text-[13px] bold-text" }, cityDestination === null || cityDestination === void 0 ? void 0 : cityDestination.label.split(",")[0]))),
39
+ React.createElement("div", { className: "flex flex-col gap-[8px]" },
40
+ React.createElement("div", { className: "flex items-center gap-[6px] rounded-[8px] px-[8px] py-[4px] w-fit mb-[6px]", style: {
41
+ border: "1px solid #363c48",
42
+ backgroundColor: "#1a202e",
43
+ } },
44
+ React.createElement("img", { src: (_d = serviceItem.icons) === null || _d === void 0 ? void 0 : _d.busIcon, alt: "bus", style: { width: "20px", height: "20px" } }),
45
+ React.createElement("span", { className: "text-[12px] whitespace-nowrap" }, "Salida flexible")),
46
+ React.createElement("div", { className: "text-[13px] bold-text whitespace-nowrap" }, "07:00 AM \u2013 10:00 AM"),
47
+ React.createElement("div", { className: "text-[12px] bold-text" }, "Vie, 04/11")),
48
+ React.createElement("div", { className: "flex items-start gap-[6px] text-[12px] " },
49
+ React.createElement("img", { src: (_e = serviceItem.icons) === null || _e === void 0 ? void 0 : _e.sheildIcon, alt: "shield", style: { width: "14px", height: "14px" } }),
50
+ React.createElement("span", null, "Tu asiento confirmado al instante."))),
51
+ React.createElement("div", { className: "px-[16px] flex flex-col items-center justify-between gap-[12px] py-[2px]" },
52
+ React.createElement("div", { className: "text-center" },
53
+ React.createElement("div", { className: "bold-text text-[14px]" }, "3 operadores compitiendo por tu compra"),
54
+ React.createElement("div", { className: "text-[12px] mt-[8px]" }, "Empresa a confirmar despu\u00E9s de tu pago")),
55
+ React.createElement("div", { className: "flex items-stretch justify-center gap-[8px] w-full mb-[16px]" }, operators.map((op, idx) => (React.createElement("div", { key: idx, className: "flex flex-col items-center justify-center gap-[8px] rounded-[8px]", style: {
56
+ width: "140px",
57
+ height: "80px",
58
+ border: "1px solid #363c48",
59
+ backgroundColor: "#1a202e",
60
+ } },
61
+ React.createElement("img", { src: serviceItem.operator_details[0], alt: op.name, className: `h-[24px] w-auto object-contain ${isSoldOut ? "grayscale" : ""}` }),
62
+ React.createElement("span", { className: "text-[11px] truncate max-w-full text-center" }, serviceItem.operator_details[2]))))),
63
+ React.createElement("div", { className: "flex items-center gap-[6px] text-[12px]" },
64
+ React.createElement("img", { src: (_f = serviceItem.icons) === null || _f === void 0 ? void 0 : _f.userIcon, alt: "eye", style: { width: "16px", height: "16px" } }),
65
+ React.createElement("span", null,
66
+ React.createElement("span", { className: "bold-text text-white" }, "50 personas"),
67
+ " ",
68
+ "est\u00E1n viendo este viaje"))),
69
+ React.createElement("div", { className: "flex flex-col justify-center gap-[12px] py-[2px] relative mb-[16px]" },
70
+ React.createElement("div", { className: "flex flex-col gap-[6px] ", style: {
71
+ alignItems: "center",
72
+ } },
73
+ React.createElement("span", { className: "text-[#FF8F45] bold-text text-[22px] leading-tight" }, "60% OFF"),
74
+ React.createElement("span", { className: "text-[#666] text-[14px] line-through" }, "$10.000"),
75
+ React.createElement("span", { className: "text-white bold-text text-[28px] leading-none" }, "$4.000")),
76
+ React.createElement("button", { className: "flex items-center gap-[6px] px-[20px] py-[10px] rounded-[12px] text-white bold-text text-[13px] mt-[4px] justify-center border-none cursor-pointer", style: {
77
+ backgroundColor: "#FF5C60",
78
+ } },
79
+ React.createElement(LottiePlayer
80
+ // animationData={serviceItem.icons.flexibleAnim}
81
+ , {
82
+ // animationData={serviceItem.icons.flexibleAnim}
83
+ animationData: getAnimationIcon("thunderAnimation"), width: "18px", height: "18px" }),
84
+ React.createElement("span", { className: "whitespace-nowrap" }, "\u00A1Lo quiero!"))),
85
+ React.createElement("div", { className: "absolute bottom-[11px] right-[18px]" },
86
+ React.createElement("img", { src: (_g = serviceItem.icons) === null || _g === void 0 ? void 0 : _g.downArrow, alt: "down arrow", style: {
87
+ width: "14px",
88
+ height: "8px",
89
+ filter: "brightness(0) invert(1)",
90
+ } }))))),
91
+ React.createElement("div", { className: "absolute -top-[11px] left-0 w-full flex items-center justify-end gap-[12px] pr-[15px] z-10 " },
92
+ React.createElement("div", { className: "flex items-center gap-[6px] py-[5px] px-[14px] rounded-[38px] text-[12.5px] bg-[#FF8F45] text-white whitespace-nowrap" },
93
+ React.createElement(LottiePlayer, { animationData: getAnimationIcon("bombAnimation"), width: "14px", height: "14px" }),
94
+ React.createElement("span", null,
95
+ React.createElement("strong", null, "Remate"),
96
+ " | Termina en",
97
+ " ",
98
+ React.createElement("strong", null, HARDCODED_COUNTDOWN),
99
+ " min")))));
100
+ };
101
+ export default FeatureServiceUi;
@@ -13,6 +13,7 @@ interface SeatSectionProps {
13
13
  removeDuplicateSeats?: boolean;
14
14
  isPeru?: boolean;
15
15
  serviceItem?: any;
16
+ renderIcon?: (iconKey: string, size?: string) => React.ReactNode;
16
17
  }
17
- declare function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, }: SeatSectionProps): React.ReactElement;
18
+ declare function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, renderIcon, }: SeatSectionProps): React.ReactElement;
18
19
  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, }) {
57
+ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, renderIcon, }) {
58
58
  const uniqueSeats = getUniqueSeats(seatTypes);
59
59
  const sortedSeatTypes = getSortedSeatTypes(seatTypes);
60
60
  const numberOfSeats = getNumberOfSeats(seatTypes);
@@ -74,9 +74,8 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
74
74
  if (isPeru) {
75
75
  const allSeats = getAllSeatTypes(seatTypes);
76
76
  const lowestFare = allSeats.length > 0 ? allSeats[0].price : 0;
77
- const { originalPrice, discountedPrice } = CommonService.calculateDiscountedPrice(lowestFare, serviceItem);
77
+ const { discountedPrice } = CommonService.calculateDiscountedPrice(lowestFare, serviceItem);
78
78
  return (React.createElement(React.Fragment, null,
79
- originalPrice !== discountedPrice && (React.createElement("span", { className: "text-[13.33px]", style: strikethroughStyle }, formatPrice(originalPrice))),
80
79
  React.createElement("span", { className: "flex items-center text-[13.33px] bold-text" }, formatPrice(discountedPrice))));
81
80
  }
82
81
  if (removeDuplicateSeats) {
@@ -95,13 +94,16 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
95
94
  : null));
96
95
  });
97
96
  };
98
- const strikethroughStyle = Object.assign({ color: "#ccc", display: "flex", textAlign: "end", textDecoration: "line-through" }, (isPeru
99
- ? { position: "relative", top: 0 }
100
- : { position: "absolute", top: isCentered ? "-10px" : "-18px" }));
101
97
  const seats = removeDuplicateSeats ? uniqueSeats : sortedSeatTypes;
102
98
  const discountedSeats = seats.map((seat) => (Object.assign(Object.assign({}, seat), CommonService.calculateDiscountedPrice(seat.price, serviceItem))));
103
- const highestOriginalPrice = Math.max(...discountedSeats.map((seat) => seat.originalPrice));
104
99
  const hasDiscount = discountedSeats.some((seat) => seat.originalPrice !== seat.discountedPrice);
100
+ const discountSeat = discountedSeats
101
+ .filter((seat) => !SEAT_EXCEPTIONS.includes(seat.label))
102
+ .sort((a, b) => a.discountedPrice - b.discountedPrice)[0];
103
+ const discountValue = (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.discount_type) === "percentage" &&
104
+ typeof (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.discount_value) === "number"
105
+ ? Math.round(serviceItem.discount_value)
106
+ : null;
105
107
  const renderLabels = () => {
106
108
  if (isPeru) {
107
109
  return (React.createElement(React.Fragment, null,
@@ -114,6 +116,37 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
114
116
  }
115
117
  return renderSeatNames();
116
118
  };
119
+ if (hasDiscount && discountSeat) {
120
+ return (React.createElement("div", { className: "grid items-center text-[13.33px] relative" },
121
+ React.createElement("div", { className: "col-start-1 row-start-2 flex items-center" },
122
+ React.createElement("span", { className: "text-[13.33px] font-normal leading-[22px] text-[#c2c2c2]" }, "Antes")),
123
+ React.createElement("div", { className: "col-start-1 row-start-3 flex h-[30px] items-end" },
124
+ React.createElement("span", { className: "text-[13.33px] font-normal leading-[24px] text-[#464647]" }, "Desde")),
125
+ React.createElement("div", { className: "col-start-2 row-start-1 flex items-center justify-center absolute", style: { top: "-22px", right: "30px" } }, discountValue != null && (React.createElement("span", { className: "rounded-[100px] bg-[#ff5964] px-[6px] text-[12px] bold-text leading-[20px] text-white", style: {
126
+ animation: "pulse-zoom 2s ease-in-out infinite",
127
+ } },
128
+ discountValue,
129
+ "% OFF"))),
130
+ React.createElement("div", { className: "col-start-2 row-start-2 flex items-center justify-center ", style: { textAlign: "center" } },
131
+ React.createElement("span", { className: "text-[13.33px] font-normal leading-[20px] text-[#9f9f9f] relative", style: {
132
+ position: "relative",
133
+ } },
134
+ formatPrice(discountSeat.originalPrice),
135
+ React.createElement("span", { style: {
136
+ position: "absolute",
137
+ left: "-2px",
138
+ top: "50%",
139
+ width: "calc(100% + 4px)",
140
+ height: "1px",
141
+ backgroundColor: "#9f9f9f",
142
+ transform: "rotate(-10deg)",
143
+ transformOrigin: "center",
144
+ } }))),
145
+ React.createElement("div", { className: "col-start-2 row-start-3 flex h-[30px] items-end justify-start" },
146
+ React.createElement("span", { className: "flex items-center gap-[6px] text-[22px] bold-text leading-[30px]", style: { color: isSoldOut ? "#c0c0c0" : "#ff5964" } },
147
+ renderIcon("fireIcon", "16px"),
148
+ formatPrice(discountSeat.discountedPrice)))));
149
+ }
117
150
  return (React.createElement("div", { className: "relative flex gap-[10px] text-[13.33px] justify-between min-h-[2.2rem]", style: isCentered ? { alignItems: "center" } : {} },
118
151
  React.createElement("div", { className: "flex flex-col justify-between", style: { gap: "10px" } }, renderLabels()),
119
152
  React.createElement("div", { className: "flex flex-col justify-between absolute inset-y-0 right-0 left-1/2 h-full", style: {
@@ -124,8 +157,6 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
124
157
  right: 0,
125
158
  justifyContent: isCentered ? "center" : "",
126
159
  gap: "10px",
127
- } },
128
- hasDiscount && !isPeru && (React.createElement("span", { className: "text-[13.33px]", style: strikethroughStyle }, formatPrice(highestOriginalPrice))),
129
- renderSeatPrices())));
160
+ } }, renderSeatPrices())));
130
161
  }
131
162
  export default SeatSection;
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ interface ServiceBadgesProps {
3
+ showTopLabel?: string;
4
+ isSoldOut: boolean;
5
+ colors: any;
6
+ renderIcon: (iconKey: string, size?: string) => React.ReactNode;
7
+ translation?: {
8
+ directService?: string;
9
+ };
10
+ serviceItem: {
11
+ is_transpordo?: boolean;
12
+ is_direct_trip?: boolean;
13
+ train_type_label?: string;
14
+ };
15
+ }
16
+ declare const ServiceBadges: React.FC<ServiceBadgesProps>;
17
+ export default ServiceBadges;
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ const ServiceBadges = ({ showTopLabel, isSoldOut, colors, renderIcon, translation, serviceItem, }) => {
3
+ return (React.createElement("div", { className: "absolute -top-[11px] left-0 w-full flex items-center justify-end gap-[12px] pr-[22px] z-10" },
4
+ showTopLabel && (React.createElement("div", { className: `flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-10`, style: {
5
+ backgroundColor: "#fff",
6
+ border: `1px solid ${colors.topLabelColor}`,
7
+ color: colors.topLabelColor,
8
+ } },
9
+ React.createElement("div", { className: isSoldOut ? "grayscale" : "" }, renderIcon("specialDeparture", "12px")),
10
+ React.createElement("div", { className: isSoldOut ? "text-white" : `text-[${colors.topLabelColor}]` }, showTopLabel))),
11
+ (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_transpordo) && (React.createElement("div", { className: `flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-20`, style: {
12
+ backgroundColor: "#fff",
13
+ border: `1px solid ${colors.topLabelColor}`,
14
+ color: colors.topLabelColor,
15
+ } },
16
+ renderIcon("connectingServiceIcon", "12px"),
17
+ React.createElement("div", null, "Conexión"))),
18
+ (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) && (React.createElement("div", { className: `flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-20`, style: {
19
+ backgroundColor: "#fff",
20
+ border: `1px solid ${colors.topLabelColor}`,
21
+ color: colors.topLabelColor,
22
+ } },
23
+ renderIcon("directo", "12px"),
24
+ React.createElement("div", null, translation === null || translation === void 0 ? void 0 : translation.directService))),
25
+ (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.train_type_label) === "Tren Express (Nuevo)" && (React.createElement("div", { className: `flex items-center gap-[10px] py-[4px] px-[14px] rounded-[38px] text-[12.5px] z-20`, style: {
26
+ backgroundColor: "#fff",
27
+ border: `1px solid ${colors.topLabelColor}`,
28
+ color: colors.topLabelColor,
29
+ } },
30
+ renderIcon("directo", "12px"),
31
+ React.createElement("div", null, "Tren Express")))));
32
+ };
33
+ export default ServiceBadges;
@@ -19,6 +19,7 @@ interface DateTimeSectionMobileProps {
19
19
  availableSeats: number;
20
20
  removeDuplicateSeats?: boolean;
21
21
  serviceItem?: any;
22
+ tooltipBgColor?: string;
22
23
  }
23
- declare function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal, isPeru, orignLabel, destinationLabel, originIcon, destinationIcon, travelDate, arrivalDate, depTime, arrTime, seatTypes, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, }: DateTimeSectionMobileProps): React.ReactElement;
24
+ declare function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal, isPeru, orignLabel, destinationLabel, originIcon, destinationIcon, travelDate, arrivalDate, depTime, arrTime, seatTypes, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, }: DateTimeSectionMobileProps): React.ReactElement;
24
25
  export default DateTimeSectionMobile;