kupos-ui-components-lib 9.0.7 → 9.0.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.
- package/README copy.md +223 -67
- package/dist/assets/images/anims/service_list/directo.json +1 -1
- package/dist/assets/images/anims/service_list/priority_stage.json +1 -1
- package/dist/components/ServiceItem/RatingHover.js +31 -31
- package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemDesktop.js +124 -299
- package/dist/components/ServiceItem/ServiceItemMobile.js +44 -291
- package/dist/components/ServiceItem/mobileTypes.d.ts +3 -0
- package/dist/components/ServiceItem/types.d.ts +7 -0
- package/dist/styles.css +76 -17
- package/dist/ui/AmenitiesBlock.js +25 -36
- package/dist/ui/BottomAmenities/BottomAmenities.js +3 -2
- package/dist/ui/DateTimeSection/DateTimeSection.d.ts +28 -0
- package/dist/ui/DateTimeSection/DateTimeSection.js +58 -0
- package/dist/ui/DirectoBlock.d.ts +8 -0
- package/dist/ui/DirectoBlock.js +11 -0
- package/dist/ui/DurationBlock.js +2 -2
- package/dist/ui/ExpendedDropDown/ExpandedDropdown.d.ts +1 -0
- package/dist/ui/ExpendedDropDown/ExpandedDropdown.js +28 -18
- package/dist/ui/FlexibleBlock.js +2 -4
- package/dist/ui/PetBlock.js +1 -3
- package/dist/ui/RatingBlock.js +6 -2
- package/dist/ui/SeatSection/SeatSection.js +1 -1
- package/dist/ui/TopAmenities/PromoCountdown.d.ts +18 -0
- package/dist/ui/TopAmenities/PromoCountdown.js +55 -0
- package/dist/ui/TopAmenities/TopAmenities.d.ts +4 -1
- package/dist/ui/TopAmenities/TopAmenities.js +31 -4
- package/dist/utils/CommonService.d.ts +1 -1
- package/package.json +2 -1
- package/src/assets/images/anims/service_list/bomb.json +1 -0
- package/src/assets/images/anims/service_list/directo.json +1 -1
- package/src/assets/images/anims/service_list/priority_stage.json +1 -1
- package/src/components/ServiceItem/RatingHover.tsx +51 -51
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +241 -616
- package/src/components/ServiceItem/ServiceItemMobile.tsx +120 -501
- package/src/components/ServiceItem/mobileTypes.ts +3 -0
- package/src/components/ServiceItem/types.ts +7 -0
- package/src/ui/AmenitiesBlock.tsx +34 -15
- package/src/ui/BottomAmenities/BottomAmenities.tsx +110 -0
- package/src/ui/DateTimeSection/DateTimeSection.tsx +207 -0
- package/src/ui/DirectoBlock.tsx +31 -0
- package/src/ui/DurationBlock.tsx +2 -2
- package/src/ui/ExpendedDropDown/ExpandedDropdown.tsx +115 -0
- package/src/ui/FlexibleBlock.tsx +3 -3
- package/src/ui/KuposButton/KuposButton.tsx +48 -0
- package/src/ui/PetBlock.tsx +2 -2
- package/src/ui/RatingBlock.tsx +16 -4
- package/src/ui/SeatSection/SeatSection.tsx +187 -0
- package/src/ui/TopAmenities/TopAmenities.tsx +116 -0
- package/src/ui/mobileweb/BottomAmenitiesMobile.tsx +168 -0
- package/src/ui/mobileweb/DateTimeSectionMobile.tsx +192 -0
- package/src/ui/mobileweb/SeatSectionMobile.tsx +256 -0
- package/src/ui/mobileweb/TopAmenitieMobile.tsx +82 -0
package/dist/styles.css
CHANGED
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
.-top-\[14px\] {
|
|
31
31
|
top: calc(14px * -1);
|
|
32
32
|
}
|
|
33
|
+
.-top-\[16px\] {
|
|
34
|
+
top: calc(16px * -1);
|
|
35
|
+
}
|
|
33
36
|
.top-\[2px\] {
|
|
34
37
|
top: 2px;
|
|
35
38
|
}
|
|
@@ -45,6 +48,9 @@
|
|
|
45
48
|
.top-\[88\%\] {
|
|
46
49
|
top: 88%;
|
|
47
50
|
}
|
|
51
|
+
.right-\[0\] {
|
|
52
|
+
right: 0;
|
|
53
|
+
}
|
|
48
54
|
.-bottom-\[9\%\] {
|
|
49
55
|
bottom: calc(9% * -1);
|
|
50
56
|
}
|
|
@@ -81,6 +87,9 @@
|
|
|
81
87
|
.left-\[80px\] {
|
|
82
88
|
left: 80px;
|
|
83
89
|
}
|
|
90
|
+
.-z-9 {
|
|
91
|
+
z-index: calc(9 * -1);
|
|
92
|
+
}
|
|
84
93
|
.-z-10 {
|
|
85
94
|
z-index: calc(10 * -1);
|
|
86
95
|
}
|
|
@@ -120,9 +129,15 @@
|
|
|
120
129
|
.-mt-\[5px\] {
|
|
121
130
|
margin-top: calc(5px * -1);
|
|
122
131
|
}
|
|
132
|
+
.-mt-\[16px\] {
|
|
133
|
+
margin-top: calc(16px * -1);
|
|
134
|
+
}
|
|
123
135
|
.mt-\[2px\] {
|
|
124
136
|
margin-top: 2px;
|
|
125
137
|
}
|
|
138
|
+
.mt-\[3px\] {
|
|
139
|
+
margin-top: 3px;
|
|
140
|
+
}
|
|
126
141
|
.mt-\[5px\] {
|
|
127
142
|
margin-top: 5px;
|
|
128
143
|
}
|
|
@@ -132,6 +147,9 @@
|
|
|
132
147
|
.mt-\[13px\] {
|
|
133
148
|
margin-top: 13px;
|
|
134
149
|
}
|
|
150
|
+
.mt-\[14px\] {
|
|
151
|
+
margin-top: 14px;
|
|
152
|
+
}
|
|
135
153
|
.mt-\[15px\] {
|
|
136
154
|
margin-top: 15px;
|
|
137
155
|
}
|
|
@@ -174,9 +192,6 @@
|
|
|
174
192
|
.mb-\[5px\] {
|
|
175
193
|
margin-bottom: 5px;
|
|
176
194
|
}
|
|
177
|
-
.mb-\[8px\] {
|
|
178
|
-
margin-bottom: 8px;
|
|
179
|
-
}
|
|
180
195
|
.mb-\[10px\] {
|
|
181
196
|
margin-bottom: 10px;
|
|
182
197
|
}
|
|
@@ -204,6 +219,9 @@
|
|
|
204
219
|
.ml-\[3px\] {
|
|
205
220
|
margin-left: 3px;
|
|
206
221
|
}
|
|
222
|
+
.ml-\[4px\] {
|
|
223
|
+
margin-left: 4px;
|
|
224
|
+
}
|
|
207
225
|
.ml-\[5px\] {
|
|
208
226
|
margin-left: 5px;
|
|
209
227
|
}
|
|
@@ -276,6 +294,9 @@
|
|
|
276
294
|
.max-h-\[66vh\] {
|
|
277
295
|
max-height: 66vh;
|
|
278
296
|
}
|
|
297
|
+
.min-h-\[2\.2rem\] {
|
|
298
|
+
min-height: 2.2rem;
|
|
299
|
+
}
|
|
279
300
|
.min-h-\[2\.5rem\] {
|
|
280
301
|
min-height: 2.5rem;
|
|
281
302
|
}
|
|
@@ -300,6 +321,9 @@
|
|
|
300
321
|
.w-\[50\%\] {
|
|
301
322
|
width: 50%;
|
|
302
323
|
}
|
|
324
|
+
.w-\[55\%\] {
|
|
325
|
+
width: 55%;
|
|
326
|
+
}
|
|
303
327
|
.w-\[60\%\] {
|
|
304
328
|
width: 60%;
|
|
305
329
|
}
|
|
@@ -321,6 +345,9 @@
|
|
|
321
345
|
.w-\[130px\] {
|
|
322
346
|
width: 130px;
|
|
323
347
|
}
|
|
348
|
+
.w-\[150px\] {
|
|
349
|
+
width: 150px;
|
|
350
|
+
}
|
|
324
351
|
.w-\[188px\] {
|
|
325
352
|
width: 188px;
|
|
326
353
|
}
|
|
@@ -333,8 +360,8 @@
|
|
|
333
360
|
.w-\[260px\] {
|
|
334
361
|
width: 260px;
|
|
335
362
|
}
|
|
336
|
-
.w-\[
|
|
337
|
-
width:
|
|
363
|
+
.w-\[280px\] {
|
|
364
|
+
width: 280px;
|
|
338
365
|
}
|
|
339
366
|
.w-\[auto\] {
|
|
340
367
|
width: auto;
|
|
@@ -342,9 +369,20 @@
|
|
|
342
369
|
.w-auto {
|
|
343
370
|
width: auto;
|
|
344
371
|
}
|
|
372
|
+
.w-fit {
|
|
373
|
+
width: -moz-fit-content;
|
|
374
|
+
width: fit-content;
|
|
375
|
+
}
|
|
345
376
|
.w-full {
|
|
346
377
|
width: 100%;
|
|
347
378
|
}
|
|
379
|
+
.w-max {
|
|
380
|
+
width: -moz-max-content;
|
|
381
|
+
width: max-content;
|
|
382
|
+
}
|
|
383
|
+
.max-w-\[120px\] {
|
|
384
|
+
max-width: 120px;
|
|
385
|
+
}
|
|
348
386
|
.max-w-\[165px\] {
|
|
349
387
|
max-width: 165px;
|
|
350
388
|
}
|
|
@@ -374,12 +412,15 @@
|
|
|
374
412
|
.cursor-pointer {
|
|
375
413
|
cursor: pointer;
|
|
376
414
|
}
|
|
377
|
-
.\[grid-template-columns\:14\%_30\%_2\.5\%_30\%_15\.5\%\] {
|
|
378
|
-
grid-template-columns: 14% 30% 2.5% 30% 15.5%;
|
|
379
|
-
}
|
|
380
415
|
.\[grid-template-columns\:14\%_40\%_0\.5\%_24\%_13\.5\%\] {
|
|
381
416
|
grid-template-columns: 14% 40% 0.5% 24% 13.5%;
|
|
382
417
|
}
|
|
418
|
+
.\[grid-template-columns\:18\%_28\%_2\.5\%_28\%_15\.5\%\] {
|
|
419
|
+
grid-template-columns: 18% 28% 2.5% 28% 15.5%;
|
|
420
|
+
}
|
|
421
|
+
.\[grid-template-columns\:22\%_28\%_2\.5\%_24\%_15\.5\%\] {
|
|
422
|
+
grid-template-columns: 22% 28% 2.5% 24% 15.5%;
|
|
423
|
+
}
|
|
383
424
|
.grid-cols-\[0\.8fr_auto_26\%_1fr\] {
|
|
384
425
|
grid-template-columns: 0.8fr auto 26% 1fr;
|
|
385
426
|
}
|
|
@@ -431,6 +472,9 @@
|
|
|
431
472
|
.gap-\[6px\] {
|
|
432
473
|
gap: 6px;
|
|
433
474
|
}
|
|
475
|
+
.gap-\[8px\] {
|
|
476
|
+
gap: 8px;
|
|
477
|
+
}
|
|
434
478
|
.gap-\[10px\] {
|
|
435
479
|
gap: 10px;
|
|
436
480
|
}
|
|
@@ -512,9 +556,6 @@
|
|
|
512
556
|
--tw-border-style: none;
|
|
513
557
|
border-style: none;
|
|
514
558
|
}
|
|
515
|
-
.border-\[\#E6E6E6\] {
|
|
516
|
-
border-color: #E6E6E6;
|
|
517
|
-
}
|
|
518
559
|
.border-\[\#ccc\] {
|
|
519
560
|
border-color: #ccc;
|
|
520
561
|
}
|
|
@@ -573,9 +614,6 @@
|
|
|
573
614
|
.p-\[10px_15px\] {
|
|
574
615
|
padding: 10px 15px;
|
|
575
616
|
}
|
|
576
|
-
.p-\[12px\] {
|
|
577
|
-
padding: 12px;
|
|
578
|
-
}
|
|
579
617
|
.p-\[15px\] {
|
|
580
618
|
padding: 15px;
|
|
581
619
|
}
|
|
@@ -591,6 +629,9 @@
|
|
|
591
629
|
.px-\[14px\] {
|
|
592
630
|
padding-inline: 14px;
|
|
593
631
|
}
|
|
632
|
+
.px-\[15px\] {
|
|
633
|
+
padding-inline: 15px;
|
|
634
|
+
}
|
|
594
635
|
.px-\[20px\] {
|
|
595
636
|
padding-inline: 20px;
|
|
596
637
|
}
|
|
@@ -603,6 +644,9 @@
|
|
|
603
644
|
.py-\[6px\] {
|
|
604
645
|
padding-block: 6px;
|
|
605
646
|
}
|
|
647
|
+
.py-\[10px\] {
|
|
648
|
+
padding-block: 10px;
|
|
649
|
+
}
|
|
606
650
|
.py-\[12px\] {
|
|
607
651
|
padding-block: 12px;
|
|
608
652
|
}
|
|
@@ -612,12 +656,18 @@
|
|
|
612
656
|
.pt-\[5px\] {
|
|
613
657
|
padding-top: 5px;
|
|
614
658
|
}
|
|
659
|
+
.pt-\[6px\] {
|
|
660
|
+
padding-top: 6px;
|
|
661
|
+
}
|
|
615
662
|
.pt-\[10px\] {
|
|
616
663
|
padding-top: 10px;
|
|
617
664
|
}
|
|
618
665
|
.pt-\[20px\] {
|
|
619
666
|
padding-top: 20px;
|
|
620
667
|
}
|
|
668
|
+
.pt-\[26px\] {
|
|
669
|
+
padding-top: 26px;
|
|
670
|
+
}
|
|
621
671
|
.pt-\[35px\] {
|
|
622
672
|
padding-top: 35px;
|
|
623
673
|
}
|
|
@@ -639,6 +689,12 @@
|
|
|
639
689
|
.pb-\[10px\] {
|
|
640
690
|
padding-bottom: 10px;
|
|
641
691
|
}
|
|
692
|
+
.pb-\[14px\] {
|
|
693
|
+
padding-bottom: 14px;
|
|
694
|
+
}
|
|
695
|
+
.pl-\[6px\] {
|
|
696
|
+
padding-left: 6px;
|
|
697
|
+
}
|
|
642
698
|
.pl-\[15px\] {
|
|
643
699
|
padding-left: 15px;
|
|
644
700
|
}
|
|
@@ -690,13 +746,13 @@
|
|
|
690
746
|
--tw-font-weight: 900;
|
|
691
747
|
font-weight: 900;
|
|
692
748
|
}
|
|
693
|
-
.text-wrap {
|
|
694
|
-
text-wrap: wrap;
|
|
695
|
-
}
|
|
696
749
|
.break-normal {
|
|
697
750
|
overflow-wrap: normal;
|
|
698
751
|
word-break: normal;
|
|
699
752
|
}
|
|
753
|
+
.text-ellipsis {
|
|
754
|
+
text-overflow: ellipsis;
|
|
755
|
+
}
|
|
700
756
|
.whitespace-normal {
|
|
701
757
|
white-space: normal;
|
|
702
758
|
}
|
|
@@ -730,6 +786,9 @@
|
|
|
730
786
|
.uppercase {
|
|
731
787
|
text-transform: uppercase;
|
|
732
788
|
}
|
|
789
|
+
.line-through {
|
|
790
|
+
text-decoration-line: line-through;
|
|
791
|
+
}
|
|
733
792
|
.opacity-0 {
|
|
734
793
|
opacity: 0%;
|
|
735
794
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import LottiePlayer from "../assets/LottiePlayer";
|
|
3
2
|
const DEFAULT_PRIORITY_IDS = ["2", "3", "13"];
|
|
4
3
|
const TOOLTIP_CLASS = "hidden group-hover:block absolute top-[30px] left-1/2 -translate-x-1/2 text-white rounded-[14px] whitespace-nowrap mt-2.5 text-center shadow-service text-[13.33px]";
|
|
5
4
|
const getAmenityBaseName = (amenityStr) => { var _a; return (_a = amenityStr === null || amenityStr === void 0 ? void 0 : amenityStr.split(".")[0]) !== null && _a !== void 0 ? _a : ""; };
|
|
@@ -27,7 +26,7 @@ const getAmenitySplit = ({ isPeru, amenities, priorityIds }) => {
|
|
|
27
26
|
};
|
|
28
27
|
};
|
|
29
28
|
const AmenitiesBlock = ({ serviceItem, metaData, isSoldOut, colors, isPeru, getAnimationIcon, getAmenityName, SvgAmenities, }) => {
|
|
30
|
-
var _a, _b
|
|
29
|
+
var _a, _b;
|
|
31
30
|
if (!metaData ||
|
|
32
31
|
!((_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.operator_details) === null || _a === void 0 ? void 0 : _a[4]) ||
|
|
33
32
|
!serviceItem.operator_details[4].length) {
|
|
@@ -45,39 +44,29 @@ const AmenitiesBlock = ({ serviceItem, metaData, isSoldOut, colors, isPeru, getA
|
|
|
45
44
|
});
|
|
46
45
|
const shouldShowPlus = plusAmenities.length > 0;
|
|
47
46
|
const grayscaleClass = isSoldOut ? "grayscale" : "";
|
|
48
|
-
return (React.createElement("div", { className: "flex items-center gap-[6px]" },
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
React.createElement(TooltipArrow, { color: colors.tooltipColor }),
|
|
73
|
-
React.createElement("div", { className: "flex flex-col gap-[10px] p-3 rounded-[8px] shadow-md", style: { backgroundColor: colors.tooltipColor } }, plusAmenities.map((val, key) => {
|
|
74
|
-
const raw = metaData.amenities[val];
|
|
75
|
-
if (isWater(raw))
|
|
76
|
-
return null;
|
|
77
|
-
const baseName = getAmenityBaseName(raw);
|
|
78
|
-
return (React.createElement("div", { key: key, className: "flex items-center gap-[5px] text-xs whitespace-nowrap" },
|
|
79
|
-
React.createElement(SvgAmenities, { moreAnemities: true, name: baseName.toUpperCase(), color: "white" }),
|
|
80
|
-
getAmenityName(baseName.split("_").join(" "))));
|
|
81
|
-
}))))))));
|
|
47
|
+
return (React.createElement("div", { className: "flex items-center gap-[6px]" }, visibleAmenities.map((val, key) => {
|
|
48
|
+
const raw = metaData.amenities[val];
|
|
49
|
+
if (isWater(raw))
|
|
50
|
+
return null;
|
|
51
|
+
const baseName = getAmenityBaseName(raw);
|
|
52
|
+
return (React.createElement("div", { key: key, className: "relative group cursor-pointer" },
|
|
53
|
+
React.createElement("div", { className: grayscaleClass },
|
|
54
|
+
React.createElement(SvgAmenities, { moreAnemities: false, name: baseName.toLowerCase() })),
|
|
55
|
+
React.createElement("div", { className: TOOLTIP_CLASS, style: {
|
|
56
|
+
backgroundColor: colors.tooltipColor,
|
|
57
|
+
zIndex: 21,
|
|
58
|
+
padding: "12px",
|
|
59
|
+
} },
|
|
60
|
+
React.createElement(TooltipArrow, { color: colors.tooltipColor }),
|
|
61
|
+
React.createElement("div", { className: "flex flex-col gap-[10px]" }, amenities.map((id, i) => {
|
|
62
|
+
const rawItem = metaData.amenities[id];
|
|
63
|
+
if (isWater(rawItem))
|
|
64
|
+
return null;
|
|
65
|
+
const name = getAmenityBaseName(rawItem);
|
|
66
|
+
return (React.createElement("div", { key: i, className: "flex items-center gap-[5px] text-xs whitespace-nowrap" },
|
|
67
|
+
React.createElement(SvgAmenities, { moreAnemities: true, name: name.toUpperCase(), color: "white" }),
|
|
68
|
+
getAmenityName(name.split("_").join(" "))));
|
|
69
|
+
})))));
|
|
70
|
+
})));
|
|
82
71
|
};
|
|
83
72
|
export default AmenitiesBlock;
|
|
@@ -10,13 +10,14 @@ function BottomAmenities({ otherItems, serviceItem, grayscaleClass, isSoldOut, i
|
|
|
10
10
|
Object.keys(serviceItem.pet_seat_info).length > 0);
|
|
11
11
|
return (React.createElement("div", { className: "flex items-center mt-[15px] border-t border-[#eee] pt-[6px]" },
|
|
12
12
|
React.createElement("div", { className: "grid items-center gap-[2%] flex-1 ", style: {
|
|
13
|
-
gridTemplateColumns: "
|
|
13
|
+
// gridTemplateColumns: " 28% 21% 23% 23%",
|
|
14
|
+
gridTemplateColumns: "28% 17% 23% 23%",
|
|
14
15
|
} }, otherItems.map((item) => (React.createElement("div", { key: item.key, className: "flex items-center" }, item.render)))),
|
|
15
16
|
React.createElement("div", { className: "flex items-center justify-end shrink-0 ml-[5px] w-[150px]" },
|
|
16
17
|
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_tracking_enabled) && (React.createElement("div", { className: grayscaleClass + " mr-[10px]" },
|
|
17
18
|
React.createElement(LottiePlayer, { animationData: getAnimationIcon("locationAnim"), width: "20px", height: "20px" }))),
|
|
18
19
|
serviceItem.is_change_ticket && (React.createElement(FlexibleBlock, { translation: translation, getAnimationIcon: getAnimationIcon, colors: colors, serviceItem: serviceItem, isSoldOut: isSoldOut })),
|
|
19
20
|
hasPetInfo && (React.createElement(PetBlock, { translation: translation, getAnimationIcon: getAnimationIcon, colors: colors, isSoldOut: isSoldOut })),
|
|
20
|
-
showDownArrow ? (React.createElement("div", { className:
|
|
21
|
+
showDownArrow ? (React.createElement("div", { className: `flex items-center cursor-pointer ml-[4px] transition-transform duration-300 w-[14px] h-[14px] ${isItemExpanded ? "rotate-180" : ""}`, onClick: onToggleExpand }, downArrowIcon)) : null)));
|
|
21
22
|
}
|
|
22
23
|
export default BottomAmenities;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface DateTimeSectionProps {
|
|
3
|
+
serviceItem: {
|
|
4
|
+
icons?: {
|
|
5
|
+
origin?: string;
|
|
6
|
+
destination?: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
boarding_stages?: string;
|
|
10
|
+
dropoff_stages?: string;
|
|
11
|
+
travel_date: string;
|
|
12
|
+
arrival_date: string;
|
|
13
|
+
dep_time: string;
|
|
14
|
+
arr_time: string;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
isSoldOut: boolean;
|
|
18
|
+
isCiva?: boolean;
|
|
19
|
+
isLinatal?: boolean;
|
|
20
|
+
removeArrivalTime?: boolean;
|
|
21
|
+
orignLabel?: string;
|
|
22
|
+
destinationLabel?: string;
|
|
23
|
+
busStage?: Record<string, string>;
|
|
24
|
+
metaData?: any;
|
|
25
|
+
colors: Record<string, any>;
|
|
26
|
+
}
|
|
27
|
+
declare function DateTimeSection({ serviceItem, isSoldOut, isCiva, isLinatal, removeArrivalTime, orignLabel, destinationLabel, busStage, metaData, colors, }: DateTimeSectionProps): React.ReactElement;
|
|
28
|
+
export default DateTimeSection;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import DateService from "../../utils/DateService";
|
|
3
|
+
import StageTooltip from "../StagesTooltip";
|
|
4
|
+
function DateTimeSection({ serviceItem, isSoldOut, isCiva, isLinatal, removeArrivalTime, orignLabel, destinationLabel, busStage, metaData, colors, }) {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
const depTime = serviceItem.dep_time || "";
|
|
7
|
+
const hasAM = depTime.includes("AM");
|
|
8
|
+
const hasPM = depTime.includes("PM");
|
|
9
|
+
const convertTo24Hour = (depTime) => {
|
|
10
|
+
const hasAM = depTime.includes("AM");
|
|
11
|
+
const hasPM = depTime.includes("PM");
|
|
12
|
+
const [timePart] = depTime.split(/AM|PM/).map((part) => part.trim());
|
|
13
|
+
const [hour, minute] = timePart.split(":").map(Number);
|
|
14
|
+
const pad = (n) => (n < 10 ? "0" + n : String(n));
|
|
15
|
+
if (hasAM) {
|
|
16
|
+
return `${pad(hour === 12 ? 0 : hour)}:${pad(minute)}`;
|
|
17
|
+
}
|
|
18
|
+
if (hasPM) {
|
|
19
|
+
return `${hour === 12 ? hour : hour + 12}:${pad(minute)}`;
|
|
20
|
+
}
|
|
21
|
+
return timePart;
|
|
22
|
+
};
|
|
23
|
+
const cleanedDepTime = convertTo24Hour(depTime);
|
|
24
|
+
return (React.createElement("div", { className: `min-h-[2.2rem] grid grid-cols-[26px_auto_26%_1fr] gap-x-4 items-center text-[13.33px] ${isSoldOut ? "text-[#c0c0c0]" : ""}`, style: {
|
|
25
|
+
gridTemplateRows: "1fr",
|
|
26
|
+
} },
|
|
27
|
+
React.createElement("div", { className: "flex flex-col gap-[6px]" },
|
|
28
|
+
orignLabel ? (React.createElement("div", { className: "w-[60px] h-[20px] flex items-center" }, orignLabel)) : (React.createElement("div", { className: "h-[20px] flex items-center" },
|
|
29
|
+
React.createElement("img", { src: (_a = serviceItem.icons) === null || _a === void 0 ? void 0 : _a.origin, alt: "origin", className: `w-[16px] h-auto mr-[8px] ${isSoldOut ? "grayscale" : ""}` }))),
|
|
30
|
+
!isCiva &&
|
|
31
|
+
(destinationLabel ? (React.createElement("div", { className: "w-[60px] h-[20px] flex items-center" }, destinationLabel)) : (React.createElement("div", { className: "h-[20px] flex items-center" },
|
|
32
|
+
React.createElement("img", { src: (_b = serviceItem.icons) === null || _b === void 0 ? void 0 : _b.destination, className: `w-[16px] h-auto mr-[8px] ${isSoldOut ? "grayscale" : ""}`, style: { opacity: isSoldOut ? 0.5 : 1 } }))))),
|
|
33
|
+
React.createElement("div", { className: "flex flex-col gap-[6px]" },
|
|
34
|
+
React.createElement(StageTooltip, { stageData: serviceItem.boarding_stages, direction: 1, terminals: busStage, serviceItem: serviceItem, metaData: metaData, colors: colors },
|
|
35
|
+
React.createElement("span", { className: "cursor-pointer bold-text capitalize" }, DateService.getServiceItemDate(serviceItem.travel_date))),
|
|
36
|
+
!isCiva && (React.createElement(StageTooltip, { stageData: serviceItem.boarding_stages, direction: 1, terminals: busStage, serviceItem: serviceItem, metaData: metaData, colors: colors },
|
|
37
|
+
React.createElement("span", { className: "cursor-pointer bold-text capitalize" }, DateService.getServiceItemDate(serviceItem.arrival_date))))),
|
|
38
|
+
React.createElement("div", { className: "flex flex-col gap-[6px] items-center" },
|
|
39
|
+
React.createElement("div", { className: "h-[20px] flex items-center justify-center" },
|
|
40
|
+
React.createElement("div", null, "\u2022")),
|
|
41
|
+
!isCiva && (React.createElement("div", { className: "h-[20px] flex items-center justify-center" }, removeArrivalTime ? null : serviceItem.arr_time ? (React.createElement("div", null, "\u2022")) : null))),
|
|
42
|
+
React.createElement("div", { className: "flex flex-col gap-[6px]" },
|
|
43
|
+
React.createElement(StageTooltip, { stageData: serviceItem.dropoff_stages, direction: 2, terminals: busStage, serviceItem: serviceItem, metaData: metaData, colors: colors },
|
|
44
|
+
React.createElement("div", { className: "font-[900] bold-text" }, isLinatal ? (React.createElement(React.Fragment, null,
|
|
45
|
+
cleanedDepTime,
|
|
46
|
+
" ",
|
|
47
|
+
React.createElement("span", null, hasPM ? "PM" : hasAM ? "AM" : ""),
|
|
48
|
+
!(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dep_time.includes("AM")) &&
|
|
49
|
+
!(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dep_time.includes("PM")) &&
|
|
50
|
+
DateService.ampmOnly(serviceItem.dep_time))) : (DateService.formatTime(serviceItem.dep_time)))),
|
|
51
|
+
!isCiva && (React.createElement(StageTooltip, { stageData: serviceItem.dropoff_stages, direction: 2, terminals: busStage, serviceItem: serviceItem, metaData: metaData, colors: colors },
|
|
52
|
+
React.createElement("div", { className: "font-[900] bold-text" }, removeArrivalTime
|
|
53
|
+
? null
|
|
54
|
+
: serviceItem.arr_time
|
|
55
|
+
? DateService.formatTime(serviceItem.arr_time)
|
|
56
|
+
: null))))));
|
|
57
|
+
}
|
|
58
|
+
export default DateTimeSection;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import LottiePlayer from "../assets/LottiePlayer";
|
|
3
|
+
const DirectoBlock = ({ translation, isSoldOut, colors, getAnimationIcon }) => (React.createElement("div", { className: "flex items-center relative whitespace-nowrap mt-[3px]" },
|
|
4
|
+
React.createElement("div", { className: `w-[18px] mr-[4px] ${isSoldOut ? "grayscale" : ""}` },
|
|
5
|
+
React.createElement(LottiePlayer, { animationData: getAnimationIcon("directoAnim"), width: "14px", height: "14px" })),
|
|
6
|
+
React.createElement("div", { className: "group text-[13.33px] cursor-pointer" }, translation === null || translation === void 0 ? void 0 :
|
|
7
|
+
translation.directService,
|
|
8
|
+
React.createElement("div", { className: "hidden group-hover:block absolute top-[24px] left-1/2 -translate-x-1/2 text-white p-3 rounded-[14px] whitespace-nowrap w-fit z-10 mt-2.5 text-center shadow-service text-[12px]", style: { backgroundColor: colors.tooltipColor } },
|
|
9
|
+
React.createElement("div", { className: "tooltip-arrow absolute -top-[7px] left-1/2 -translate-x-1/2 w-0 h-0 border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent", style: { borderBottomColor: colors.tooltipColor } }), translation === null || translation === void 0 ? void 0 :
|
|
10
|
+
translation.directServiceText))));
|
|
11
|
+
export default DirectoBlock;
|
package/dist/ui/DurationBlock.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
const DurationBlock = ({ serviceItem, translation, renderIcon, isSoldOut, colors, }) => (React.createElement("div", { className: "flex items-baseline relative whitespace-nowrap" },
|
|
2
|
+
const DurationBlock = ({ serviceItem, translation, renderIcon, isSoldOut, colors, }) => (React.createElement("div", { className: "flex items-baseline relative whitespace-nowrap " },
|
|
3
3
|
React.createElement("div", { className: `w-[18px] mr-[4px] ${isSoldOut ? "grayscale" : ""}` }, renderIcon("hours", "14px")),
|
|
4
|
-
React.createElement("div", { className: "group text-[13.33px]" },
|
|
4
|
+
React.createElement("div", { className: "group text-[13.33px] cursor-pointer" },
|
|
5
5
|
serviceItem.duration,
|
|
6
6
|
" ",
|
|
7
7
|
translation.hours,
|
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import LottiePlayer from "../../assets/LottiePlayer";
|
|
3
2
|
function ExpandedDropdown({ serviceItem, showPromo, colors, grayscaleClass, translation, getAnimationIcon, }) {
|
|
3
|
+
var _a, _b;
|
|
4
4
|
const hasPetInfo = serviceItem.pet_seat_info &&
|
|
5
5
|
Object.keys(serviceItem.pet_seat_info).length > 0;
|
|
6
|
-
return (React.createElement("div", { className: "px-[15px] pt-[26px] pb-[14px] -mt-[16px] pt-[
|
|
7
|
-
backgroundColor: "#
|
|
6
|
+
return (React.createElement("div", { className: "px-[15px] pt-[26px] pb-[14px] -mt-[16px] pt-[35px] relative -z-9", style: {
|
|
7
|
+
backgroundColor: "#ffefef",
|
|
8
8
|
borderRadius: "0 0 10px 10px",
|
|
9
9
|
// border: showPromo ? `1px solid ${colors.priceColor}` : "1px solid #ccc",
|
|
10
|
-
border: `1px solid ${colors.priceColor}`,
|
|
11
|
-
borderTop: "none",
|
|
10
|
+
// border: `1px solid ${colors.priceColor}`,
|
|
11
|
+
// borderTop: "none",
|
|
12
12
|
} },
|
|
13
|
-
React.createElement("div", { className: "flex flex-col gap-[
|
|
14
|
-
|
|
15
|
-
React.createElement(
|
|
16
|
-
React.createElement("
|
|
17
|
-
React.createElement("span",
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
React.createElement("div", { className: "flex flex-col gap-[10px] text-[13px] text-[#464647]", style: { lineHeight: 1.6 } },
|
|
14
|
+
React.createElement("div", { className: "flex gap-[8px] text-[13.33px]" },
|
|
15
|
+
React.createElement("span", { style: { marginTop: "2px" } }, "\u2022"),
|
|
16
|
+
React.createElement("span", null,
|
|
17
|
+
React.createElement("span", { className: "bold-text" }, "Pol\u00EDticas de anulaci\u00F3n:"),
|
|
18
|
+
" Tu pasaje puede ser anulado de forma online",
|
|
19
|
+
" ",
|
|
20
|
+
React.createElement("span", { className: "bold-text" },
|
|
21
|
+
"hasta ", (_a = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.change_ticket_hours) !== null && _a !== void 0 ? _a : 6,
|
|
22
|
+
" horas antes"),
|
|
23
|
+
" ",
|
|
24
|
+
"de la salida del bus. Al anular tu pasaje recibir\u00E1s una devoluci\u00F3n del 85% del monto de tu compra.")),
|
|
25
|
+
React.createElement("div", { className: "flex gap-[8px]" },
|
|
26
|
+
React.createElement("span", { style: { marginTop: "2px" } }, "\u2022"),
|
|
27
|
+
React.createElement("span", null,
|
|
28
|
+
React.createElement("span", { className: "bold-text" }, "Pol\u00EDticas de cambios:"),
|
|
29
|
+
" Tu pasaje puede ser cambiado de manera online",
|
|
30
|
+
" ",
|
|
31
|
+
React.createElement("span", { className: "bold-text" },
|
|
32
|
+
"hasta ", (_b = serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.change_ticket_hours) !== null && _b !== void 0 ? _b : 6,
|
|
33
|
+
" horas antes"),
|
|
34
|
+
" ",
|
|
35
|
+
"de la salida del bus. El monto ser\u00E1 reembolsado a tu billetera kupospay.")))));
|
|
26
36
|
}
|
|
27
37
|
export default ExpandedDropdown;
|
package/dist/ui/FlexibleBlock.js
CHANGED
|
@@ -3,16 +3,14 @@ import LottiePlayer from "../assets/LottiePlayer";
|
|
|
3
3
|
const FlexibleBlock = ({ translation, getAnimationIcon, colors, serviceItem, isSoldOut, }) => {
|
|
4
4
|
var _a;
|
|
5
5
|
return (React.createElement("div", { className: "flex items-center" },
|
|
6
|
-
React.createElement("div", { className: "relative group cursor-
|
|
6
|
+
React.createElement("div", { className: "relative group cursor-pointer" },
|
|
7
7
|
React.createElement("div", { className: "flex items-center" },
|
|
8
8
|
React.createElement("div", { className: `mr-[5px] ${isSoldOut ? "grayscale" : ""}` },
|
|
9
9
|
React.createElement(LottiePlayer
|
|
10
10
|
// animationData={serviceItem.icons.flexibleAnim}
|
|
11
11
|
, {
|
|
12
12
|
// animationData={serviceItem.icons.flexibleAnim}
|
|
13
|
-
animationData: getAnimationIcon("flexibleIcon"), width: "20px", height: "20px" })),
|
|
14
|
-
React.createElement("div", { className: "h-auto mr-[4px] text-[13px] text-[#464647]" },
|
|
15
|
-
React.createElement("span", null, translation === null || translation === void 0 ? void 0 : translation.flexible))),
|
|
13
|
+
animationData: getAnimationIcon("flexibleIcon"), width: "20px", height: "20px" }))),
|
|
16
14
|
React.createElement("div", { className: "hidden group-hover:block absolute top-[24px] left-1/2 -translate-x-1/2 text-white p-3 rounded-[14px] whitespace-normal z-10 mt-2.5 w-[230px] text-center break-normal shadow-service text-[12px]", style: {
|
|
17
15
|
backgroundColor: colors.tooltipColor,
|
|
18
16
|
lineHeight: "1.5",
|
package/dist/ui/PetBlock.js
CHANGED
|
@@ -8,9 +8,7 @@ const PetBlock = ({ translation, getAnimationIcon, colors, isSoldOut }) => (Reac
|
|
|
8
8
|
// animationData={serviceItem.icons.petFriendlyAnim}
|
|
9
9
|
, {
|
|
10
10
|
// animationData={serviceItem.icons.petFriendlyAnim}
|
|
11
|
-
animationData: getAnimationIcon("petFriendlyAnim"), width: "20px", height: "20px" })),
|
|
12
|
-
React.createElement("div", { className: "h-auto mr-[4px] text-[13px] text-[#464647]" },
|
|
13
|
-
React.createElement("span", null, translation === null || translation === void 0 ? void 0 : translation.petFriendly))),
|
|
11
|
+
animationData: getAnimationIcon("petFriendlyAnim"), width: "20px", height: "20px" }))),
|
|
14
12
|
React.createElement("div", { className: " hidden group-hover:block absolute top-[24px] left-1/2 -translate-x-1/2 text-white p-3 rounded-[14px] whitespace-normal z-10 mt-2.5 w-[230px] text-center break-normal shadow-service", style: { backgroundColor: colors === null || colors === void 0 ? void 0 : colors.tooltipColor } },
|
|
15
13
|
React.createElement("div", { className: "tooltip-arrow absolute text-[13.33px] -top-[7px] left-1/2 -translate-x-1/2 w-0 h-0 border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent", style: { borderBottomColor: colors === null || colors === void 0 ? void 0 : colors.tooltipColor } }),
|
|
16
14
|
"Este servicio incluye asientos para mascotas."))));
|
package/dist/ui/RatingBlock.js
CHANGED
|
@@ -2,8 +2,12 @@ import React from "react";
|
|
|
2
2
|
import RatingHover from "../components/ServiceItem/RatingHover";
|
|
3
3
|
const RatingBlock = ({ showRating, serviceItem, isSoldOut, colors, t, translation, }) => (React.createElement("div", { className: "flex items-center whitespace-nowrap" },
|
|
4
4
|
showRating && (React.createElement(RatingHover, { serviceItem: serviceItem, isSoldOut: isSoldOut, colors: colors, t: t, translation: translation })),
|
|
5
|
-
React.createElement("
|
|
5
|
+
React.createElement("div", { className: "group relative ml-[10px] text-[13.33px]", style: {
|
|
6
6
|
marginLeft: showRating ? "10px" : "0",
|
|
7
7
|
color: isSoldOut ? "#c0c0c0" : "#464647",
|
|
8
|
-
} },
|
|
8
|
+
} },
|
|
9
|
+
React.createElement("span", { className: "block max-w-[120px] overflow-hidden text-ellipsis whitespace-nowrap cursor-pointer" }, serviceItem.operator_details[2]),
|
|
10
|
+
React.createElement("div", { className: "hidden group-hover:block absolute top-[24px] left-1/2 -translate-x-1/2 text-white p-3 rounded-[14px] whitespace-nowrap z-10 mt-2.5 w-max text-center shadow-service text-[12px]", style: { backgroundColor: colors.tooltipColor } },
|
|
11
|
+
React.createElement("div", { className: "tooltip-arrow absolute -top-[7px] left-1/2 -translate-x-1/2 w-0 h-0 border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent ", style: { borderBottomColor: colors.tooltipColor } }),
|
|
12
|
+
serviceItem.operator_details[2]))));
|
|
9
13
|
export default RatingBlock;
|
|
@@ -75,7 +75,7 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
|
|
|
75
75
|
const strikethroughStyle = Object.assign({ color: "#ccc", display: "flex", textAlign: "end", textDecoration: "line-through" }, (isPeru
|
|
76
76
|
? { position: "relative", top: 0 }
|
|
77
77
|
: { position: "absolute", top: isCentered ? "-10px" : "-18px" }));
|
|
78
|
-
return (React.createElement("div", { className: "relative flex gap-[10px] text-[13.33px] justify-between min-h-[2.
|
|
78
|
+
return (React.createElement("div", { className: "relative flex gap-[10px] text-[13.33px] justify-between min-h-[2.2rem]", style: isCentered ? { alignItems: "center" } : {} },
|
|
79
79
|
React.createElement("div", { className: "flex flex-col justify-between", style: { gap: "10px" } }, renderLabels()),
|
|
80
80
|
React.createElement("div", { className: "flex flex-col justify-between absolute inset-y-0 right-0 left-1/2 h-full", style: {
|
|
81
81
|
color: isSoldOut ? "#c0c0c0" : priceColor,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface PromoCountdownProps {
|
|
3
|
+
countdownSeconds: number;
|
|
4
|
+
}
|
|
5
|
+
interface PromoCountdownState {
|
|
6
|
+
remaining: number;
|
|
7
|
+
}
|
|
8
|
+
declare class PromoCountdown extends React.Component<PromoCountdownProps, PromoCountdownState> {
|
|
9
|
+
private timer;
|
|
10
|
+
constructor(props: PromoCountdownProps);
|
|
11
|
+
componentDidMount(): void;
|
|
12
|
+
componentDidUpdate(prevProps: PromoCountdownProps): void;
|
|
13
|
+
componentWillUnmount(): void;
|
|
14
|
+
private clearTimer;
|
|
15
|
+
private startTimer;
|
|
16
|
+
render(): React.JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
export default PromoCountdown;
|