kupos-ui-components-lib 9.10.0 → 9.10.2
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/dist/KuposUIComponent.d.ts +14 -1
- package/dist/KuposUIComponent.js +3 -0
- package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemDesktop.js +2 -20
- package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
- package/dist/components/ServiceItem/ServiceItemMobile.js +2 -2
- package/dist/components/ServiceItem/mobileTypes.d.ts +0 -2
- package/dist/components/ServiceItem/types.d.ts +0 -7
- package/dist/components/Survey/SurveyDesktop.js +17 -16
- package/dist/components/Survey/SurveyMobile.js +17 -16
- package/dist/index.d.ts +5 -1
- package/dist/index.js +9 -1
- package/dist/styles.css +32 -6
- package/dist/ui/SeatSection/SeatSection.d.ts +1 -7
- package/dist/ui/SeatSection/SeatSection.js +9 -38
- package/dist/ui/mobileweb/DateTimeSectionMobile.d.ts +1 -2
- package/dist/ui/mobileweb/DateTimeSectionMobile.js +6 -12
- package/dist/ui/mobileweb/SeatSectionMobile.d.ts +1 -2
- package/dist/ui/mobileweb/SeatSectionMobile.js +14 -21
- package/dist/ui/mobileweb/ServiceBadgesMobile.js +2 -2
- package/dist/utils/CommonService.d.ts +1 -1
- package/dist/utils/CommonService.js +1 -5
- package/package.json +1 -1
- package/src/KuposUIComponent.tsx +22 -1
- package/src/assets/images/anims/service_list/succes_anim.json +1 -0
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +0 -43
- package/src/components/ServiceItem/ServiceItemMobile.tsx +1 -3
- package/src/components/ServiceItem/mobileTypes.ts +26 -32
- package/src/components/ServiceItem/types.ts +0 -12
- package/src/components/Survey/ResponsiveSurvey.tsx +14 -0
- package/src/components/Survey/SurveyDesktop.tsx +121 -0
- package/src/components/Survey/SurveyMobile.tsx +125 -0
- package/src/components/Survey/index.ts +5 -0
- package/src/components/Survey/types.ts +22 -0
- package/src/index.ts +23 -0
- package/src/ui/BottomSheet/BottomSheet.tsx +131 -0
- package/src/ui/BottomSheet/index.ts +2 -0
- package/src/ui/Modal/Modal.tsx +92 -0
- package/src/ui/Modal/ModalHeader.tsx +58 -0
- package/src/ui/Modal/index.ts +4 -0
- package/src/ui/SeatSection/SeatSection.tsx +18 -86
- package/src/ui/Survey/FeedbackBanner.tsx +36 -0
- package/src/ui/Survey/FeedbackTextarea.tsx +84 -0
- package/src/ui/Survey/HeartIcon.tsx +18 -0
- package/src/ui/Survey/ScoreButtons.tsx +91 -0
- package/src/ui/Survey/SurveyFooter.tsx +145 -0
- package/src/ui/Survey/SurveyHeader.tsx +72 -0
- package/src/ui/Survey/ThankYouCard.tsx +100 -0
- package/src/ui/Survey/constants.ts +59 -0
- package/src/ui/Survey/index.ts +9 -0
- package/src/ui/mobileweb/DateTimeSectionMobile.tsx +35 -44
- package/src/ui/mobileweb/SeatSectionMobile.tsx +11 -26
- package/src/ui/mobileweb/ServiceBadgesMobile.tsx +2 -2
- package/src/utils/CommonService.ts +1 -7
|
@@ -31,7 +31,6 @@ interface SeatSectionMobileProps {
|
|
|
31
31
|
tooltipBgColor?: string;
|
|
32
32
|
showLastSeats?: boolean;
|
|
33
33
|
discountSeatPriceColor?: string;
|
|
34
|
-
isTrain?: boolean;
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
interface SeatRowProps {
|
|
@@ -43,7 +42,6 @@ interface SeatRowProps {
|
|
|
43
42
|
seatPriceColor: string;
|
|
44
43
|
hasMultipleTypes: boolean;
|
|
45
44
|
textSize: string;
|
|
46
|
-
isTrain?: boolean;
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
const SeatRow: React.FC<SeatRowProps> = ({
|
|
@@ -55,7 +53,6 @@ const SeatRow: React.FC<SeatRowProps> = ({
|
|
|
55
53
|
seatPriceColor,
|
|
56
54
|
hasMultipleTypes,
|
|
57
55
|
textSize,
|
|
58
|
-
isTrain,
|
|
59
56
|
}) => {
|
|
60
57
|
if (EXCEPTIONS.includes(type.label)) return null;
|
|
61
58
|
|
|
@@ -72,12 +69,7 @@ const SeatRow: React.FC<SeatRowProps> = ({
|
|
|
72
69
|
className={`min-[420]:text-[13px] ${textSize} `}
|
|
73
70
|
style={{ color: labelColor }}
|
|
74
71
|
>
|
|
75
|
-
{
|
|
76
|
-
? commonService.truncateSeatLabel(
|
|
77
|
-
commonService.capitalize(displayLabel),
|
|
78
|
-
8,
|
|
79
|
-
)
|
|
80
|
-
: displayLabel}
|
|
72
|
+
{displayLabel}
|
|
81
73
|
</span>
|
|
82
74
|
<span
|
|
83
75
|
className={`min-[420]:text-[13px] ${textSize} bold-text`}
|
|
@@ -126,7 +118,6 @@ function SeatSectionMobile({
|
|
|
126
118
|
tooltipBgColor,
|
|
127
119
|
showLastSeats,
|
|
128
120
|
discountSeatPriceColor,
|
|
129
|
-
isTrain,
|
|
130
121
|
}: SeatSectionMobileProps): React.ReactElement {
|
|
131
122
|
const hasMultipleTypes = (seatTypesData?.length ?? 0) > 2;
|
|
132
123
|
|
|
@@ -287,17 +278,15 @@ function SeatSectionMobile({
|
|
|
287
278
|
seatPriceColor={seatPriceColor}
|
|
288
279
|
hasMultipleTypes={hasMultipleTypes}
|
|
289
280
|
textSize="text-[11px]"
|
|
290
|
-
isTrain={isTrain}
|
|
291
281
|
/>
|
|
292
282
|
));
|
|
293
283
|
}
|
|
294
284
|
|
|
295
|
-
|
|
285
|
+
return seatTypesData
|
|
296
286
|
?.filter((item) => getFilteredSeats(item.label))
|
|
297
|
-
?.sort((a, b) => a.fare - b.fare)
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
(type, i) => (
|
|
287
|
+
?.sort((a, b) => a.fare - b.fare)
|
|
288
|
+
?.slice(0, 2)
|
|
289
|
+
?.map((type, i) => (
|
|
301
290
|
<SeatRow
|
|
302
291
|
key={i}
|
|
303
292
|
type={type}
|
|
@@ -308,20 +297,16 @@ function SeatSectionMobile({
|
|
|
308
297
|
seatPriceColor={seatPriceColor}
|
|
309
298
|
hasMultipleTypes={hasMultipleTypes}
|
|
310
299
|
textSize="text-[12px]"
|
|
311
|
-
isTrain={isTrain}
|
|
312
300
|
/>
|
|
313
|
-
)
|
|
314
|
-
);
|
|
301
|
+
));
|
|
315
302
|
};
|
|
316
303
|
|
|
317
304
|
const seats = removeDuplicateSeats
|
|
318
305
|
? getUniqueSeats(seatTypesData, 3)
|
|
319
|
-
:
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
return isTrain ? filtered : filtered?.slice(0, 2);
|
|
324
|
-
})();
|
|
306
|
+
: seatTypesData
|
|
307
|
+
?.filter((item) => getFilteredSeats(item.label))
|
|
308
|
+
?.sort((a, b) => a.fare - b.fare)
|
|
309
|
+
?.slice(0, 2);
|
|
325
310
|
|
|
326
311
|
const discountedSeats = seats?.map((seat) => ({
|
|
327
312
|
...seat,
|
|
@@ -556,7 +541,7 @@ function SeatSectionMobile({
|
|
|
556
541
|
</div>
|
|
557
542
|
) : (
|
|
558
543
|
<div
|
|
559
|
-
className=
|
|
544
|
+
className="flex flex-col justify-between h-[2.5rem] "
|
|
560
545
|
style={{
|
|
561
546
|
gap: isSoldOut ? "0px" : "5px",
|
|
562
547
|
justifyContent: hasMultipleTypes ? "space-between" : "center",
|
|
@@ -24,10 +24,10 @@ const ServiceBadgesMobile: React.FC<ServiceBadgesMobileProps> = ({
|
|
|
24
24
|
isConexion,
|
|
25
25
|
}) => {
|
|
26
26
|
return (
|
|
27
|
-
<div className="absolute -top-[
|
|
27
|
+
<div className="absolute -top-[11px] left-0 w-full flex items-center justify-end gap-[12px] pr-[17px] z-10">
|
|
28
28
|
{showTopLabel && (
|
|
29
29
|
<div
|
|
30
|
-
className={`flex items-center gap-[2p x] py-[4px] px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] z-20`}
|
|
30
|
+
className={`flex items-center gap-[2p x] py-[4px] px-[10px] rounded-[38px] min-[420]:text-[12px] text-[10px] h-[24px] z-20`}
|
|
31
31
|
style={{
|
|
32
32
|
backgroundColor: "#fff",
|
|
33
33
|
border: isSoldOut
|
|
@@ -39,15 +39,9 @@ const commonService = {
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
|
|
42
|
-
truncateSeatLabel: (label: string | number
|
|
42
|
+
truncateSeatLabel: (label: string | number): string => {
|
|
43
43
|
if (typeof label !== "string") return String(label);
|
|
44
44
|
if (label.includes("(")) return label;
|
|
45
|
-
|
|
46
|
-
// If maxLength provided, hard-truncate regardless of word count
|
|
47
|
-
if (maxLength != null && label.length > maxLength) {
|
|
48
|
-
return label.slice(0, maxLength) + "...";
|
|
49
|
-
}
|
|
50
|
-
|
|
51
45
|
const words = label.trim().split(/\s+/);
|
|
52
46
|
|
|
53
47
|
const truncateWord = (word: string) =>
|