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.
Files changed (54) hide show
  1. package/dist/KuposUIComponent.d.ts +14 -1
  2. package/dist/KuposUIComponent.js +3 -0
  3. package/dist/components/ServiceItem/ServiceItemDesktop.d.ts +1 -1
  4. package/dist/components/ServiceItem/ServiceItemDesktop.js +2 -20
  5. package/dist/components/ServiceItem/ServiceItemMobile.d.ts +1 -1
  6. package/dist/components/ServiceItem/ServiceItemMobile.js +2 -2
  7. package/dist/components/ServiceItem/mobileTypes.d.ts +0 -2
  8. package/dist/components/ServiceItem/types.d.ts +0 -7
  9. package/dist/components/Survey/SurveyDesktop.js +17 -16
  10. package/dist/components/Survey/SurveyMobile.js +17 -16
  11. package/dist/index.d.ts +5 -1
  12. package/dist/index.js +9 -1
  13. package/dist/styles.css +32 -6
  14. package/dist/ui/SeatSection/SeatSection.d.ts +1 -7
  15. package/dist/ui/SeatSection/SeatSection.js +9 -38
  16. package/dist/ui/mobileweb/DateTimeSectionMobile.d.ts +1 -2
  17. package/dist/ui/mobileweb/DateTimeSectionMobile.js +6 -12
  18. package/dist/ui/mobileweb/SeatSectionMobile.d.ts +1 -2
  19. package/dist/ui/mobileweb/SeatSectionMobile.js +14 -21
  20. package/dist/ui/mobileweb/ServiceBadgesMobile.js +2 -2
  21. package/dist/utils/CommonService.d.ts +1 -1
  22. package/dist/utils/CommonService.js +1 -5
  23. package/package.json +1 -1
  24. package/src/KuposUIComponent.tsx +22 -1
  25. package/src/assets/images/anims/service_list/succes_anim.json +1 -0
  26. package/src/components/ServiceItem/ServiceItemDesktop.tsx +0 -43
  27. package/src/components/ServiceItem/ServiceItemMobile.tsx +1 -3
  28. package/src/components/ServiceItem/mobileTypes.ts +26 -32
  29. package/src/components/ServiceItem/types.ts +0 -12
  30. package/src/components/Survey/ResponsiveSurvey.tsx +14 -0
  31. package/src/components/Survey/SurveyDesktop.tsx +121 -0
  32. package/src/components/Survey/SurveyMobile.tsx +125 -0
  33. package/src/components/Survey/index.ts +5 -0
  34. package/src/components/Survey/types.ts +22 -0
  35. package/src/index.ts +23 -0
  36. package/src/ui/BottomSheet/BottomSheet.tsx +131 -0
  37. package/src/ui/BottomSheet/index.ts +2 -0
  38. package/src/ui/Modal/Modal.tsx +92 -0
  39. package/src/ui/Modal/ModalHeader.tsx +58 -0
  40. package/src/ui/Modal/index.ts +4 -0
  41. package/src/ui/SeatSection/SeatSection.tsx +18 -86
  42. package/src/ui/Survey/FeedbackBanner.tsx +36 -0
  43. package/src/ui/Survey/FeedbackTextarea.tsx +84 -0
  44. package/src/ui/Survey/HeartIcon.tsx +18 -0
  45. package/src/ui/Survey/ScoreButtons.tsx +91 -0
  46. package/src/ui/Survey/SurveyFooter.tsx +145 -0
  47. package/src/ui/Survey/SurveyHeader.tsx +72 -0
  48. package/src/ui/Survey/ThankYouCard.tsx +100 -0
  49. package/src/ui/Survey/constants.ts +59 -0
  50. package/src/ui/Survey/index.ts +9 -0
  51. package/src/ui/mobileweb/DateTimeSectionMobile.tsx +35 -44
  52. package/src/ui/mobileweb/SeatSectionMobile.tsx +11 -26
  53. package/src/ui/mobileweb/ServiceBadgesMobile.tsx +2 -2
  54. package/src/utils/CommonService.ts +1 -7
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  interface KuposUIComponentProps {
3
- typeOfComponent: "serviceitem" | "paymentsidebar" | "servicelist" | "filterbar";
3
+ typeOfComponent: "serviceitem" | "paymentsidebar" | "servicelist" | "filterbar" | "survey" | "cuponerafilterbar";
4
4
  variant?: "mobile" | "desktop";
5
5
  serviceItem?: any;
6
6
  onBookButtonPress?: () => void;
@@ -82,6 +82,19 @@ interface KuposUIComponentProps {
82
82
  sortOrder?: "asc" | "desc";
83
83
  };
84
84
  onFilterChange?: (filters: any) => void;
85
+ isOpen?: boolean;
86
+ selectedScore?: number | null;
87
+ onScoreChange?: (score: number) => void;
88
+ feedback?: string;
89
+ onFeedbackChange?: (text: string) => void;
90
+ onClose?: () => void;
91
+ onSkip?: () => void;
92
+ onSubmit?: (score: number, feedback: string) => void;
93
+ isSubmitted?: boolean;
94
+ bookingId?: string;
95
+ origin?: string;
96
+ destination?: string;
97
+ operatorName?: string;
85
98
  }
86
99
  export default function KuposUIComponent(props: KuposUIComponentProps): React.ReactElement;
87
100
  export {};
@@ -15,6 +15,7 @@ import { ResponsivePaymentSideBar } from "./components/PaymentSideBar";
15
15
  import { ResponsiveServiceList } from "./components/ServiceList";
16
16
  import { ResponsiveFilterBar } from "./components/FilterBar";
17
17
  import ResponsiveCuponeraFilterBar from "./components/CuponeraFilterBar/ResponsiveCuponeraFilterBar";
18
+ import { ResponsiveSurvey } from "./components/Survey";
18
19
  // Using imported ResponsivePaymentSideBar component instead
19
20
  export default function KuposUIComponent(props) {
20
21
  const { typeOfComponent } = props, restProps = __rest(props, ["typeOfComponent"]);
@@ -29,6 +30,8 @@ export default function KuposUIComponent(props) {
29
30
  return (React.createElement(ResponsiveFilterBar, Object.assign({}, restProps)));
30
31
  case "cuponerafilterbar":
31
32
  return (React.createElement(ResponsiveCuponeraFilterBar, Object.assign({}, restProps)));
33
+ case "survey":
34
+ return React.createElement(ResponsiveSurvey, Object.assign({}, restProps));
32
35
  default:
33
36
  return (React.createElement("div", { className: "error-message" },
34
37
  "Invalid component type: ",
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { ServiceItemProps } from "./types";
3
- declare function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isPeruSites, showAvailableSeats, isSeatIcon, isLinatal, isPeru, t, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, isNewUi, showLoginModal, isLoggedIn, showLoginOption, isTrain, selectedSeatKey, onSeatSelect, onTrainButtonClick, showSeatSelectionError, onShowSeatSelectionError, onClearSeatSelectionError, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, }: ServiceItemProps & {
3
+ declare function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isPeruSites, showAvailableSeats, isSeatIcon, isLinatal, isPeru, t, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, isNewUi, showLoginModal, isLoggedIn, showLoginOption, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, }: ServiceItemProps & {
4
4
  currencySign?: string;
5
5
  }): React.ReactElement;
6
6
  export default ServiceItemPB;
@@ -87,12 +87,8 @@ const ANIMATION_MAP = {
87
87
  kupos: flameAnimation,
88
88
  },
89
89
  };
90
- function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isPeruSites, showAvailableSeats, isSeatIcon, isLinatal, isPeru, t = (key) => key, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, isNewUi, showLoginModal, isLoggedIn, showLoginOption, isTrain, selectedSeatKey, onSeatSelect, onTrainButtonClick, showSeatSelectionError, onShowSeatSelectionError, onClearSeatSelectionError, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, }) {
90
+ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, children, busStage, serviceDetailsLoading, cityOrigin, cityDestination, translation, orignLabel, destinationLabel, currencySign, isCiva, showRating, showLastSeats, removeArrivalTime, removeDuplicateSeats, isPeruSites, showAvailableSeats, isSeatIcon, isLinatal, isPeru, t = (key) => key, siteType, isAllinBus, isExpand, setIsExpand, coachKey, viewersConfig, isNewUi, showLoginModal, isLoggedIn, showLoginOption, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, }) {
91
91
  var _a, _b, _c;
92
- const handleSeatSelect = (key, price, seatKey, apiSeatType) => {
93
- onClearSeatSelectionError === null || onClearSeatSelectionError === void 0 ? void 0 : onClearSeatSelectionError();
94
- onSeatSelect === null || onSeatSelect === void 0 ? void 0 : onSeatSelect(key, price, seatKey, apiSeatType);
95
- };
96
92
  const getAnimationIcon = (icon) => {
97
93
  var _a;
98
94
  const animation = ANIMATION_MAP[icon];
@@ -231,16 +227,6 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
231
227
  });
232
228
  return;
233
229
  }
234
- if (isTrain) {
235
- if (!selectedSeatKey) {
236
- onShowSeatSelectionError === null || onShowSeatSelectionError === void 0 ? void 0 : onShowSeatSelectionError(serviceItem.id);
237
- return;
238
- }
239
- if (onTrainButtonClick) {
240
- onTrainButtonClick();
241
- return;
242
- }
243
- }
244
230
  onBookButtonPress();
245
231
  };
246
232
  const items = [
@@ -307,13 +293,9 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
307
293
  backgroundColor: "#ccc",
308
294
  } }),
309
295
  React.createElement("div", { className: "content-center" },
310
- React.createElement(SeatSection, { seatTypes: serviceItem.seat_types, serviceItem: serviceItem, availableSeats: serviceItem.available_seats, isSoldOut: isSoldOut, priceColor: colors.priceColor, dpSeatColor: colors.seatPriceColor, currencySign: currencySign, removeDuplicateSeats: removeDuplicateSeats, isPeru: isPeru, renderIcon: renderIcon, discountSeatPriceColor: colors.discountSeatPriceColor, isTrain: isTrain, selectedSeatKey: selectedSeatKey, onSeatSelect: handleSeatSelect, topLabelColor: colors.topLabelColor })),
296
+ React.createElement(SeatSection, { seatTypes: serviceItem.seat_types, serviceItem: serviceItem, availableSeats: serviceItem.available_seats, isSoldOut: isSoldOut, priceColor: colors.priceColor, dpSeatColor: colors.seatPriceColor, currencySign: currencySign, removeDuplicateSeats: removeDuplicateSeats, isPeru: isPeru, renderIcon: renderIcon, discountSeatPriceColor: colors.discountSeatPriceColor })),
311
297
  React.createElement("div", { className: "relative" },
312
298
  React.createElement(KuposButton, { isSoldOut: isSoldOut, isLoading: serviceDetailsLoading, buttonColor: colors.kuposButtonColor, buyLabel: translation === null || translation === void 0 ? void 0 : translation.buyButton, soldOutLabel: translation === null || translation === void 0 ? void 0 : translation.soldOutButton, soldOutIcon: renderIcon("soldOutIcon", "14px"), onClick: checkMidnight }),
313
- showSeatSelectionError === serviceItem.id && isTrain && (React.createElement("div", { className: "flex justify-center mr-[11px] w-[100%] right-[0px] absolute left-[0] top-[40px]" },
314
- React.createElement("div", { className: "text-[9px] text-center whitespace-nowrap", style: {
315
- color: colors.seatPriceColor,
316
- } }, "Selecciona el tipo de servicio"))),
317
299
  showLastSeats ? (React.createElement("div", { className: "flex justify-center mr-[11px] w-[100%] right-[0px] absolute left-[0] top-[40px]" }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) < 10 &&
318
300
  (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) > 0 && (React.createElement("div", { className: "text-[12px] mt-1 text-center", style: {
319
301
  color: colors.seatPriceColor,
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { MobileServiceItemProps } from "./mobileTypes";
3
- declare function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, operatorLabel, isTrain, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUi, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, }: MobileServiceItemProps): React.ReactElement;
3
+ declare function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUi, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, }: MobileServiceItemProps): React.ReactElement;
4
4
  export default ServiceItemMobile;
@@ -18,7 +18,7 @@ const exceptions = [
18
18
  "blanco",
19
19
  "asiento_mascota",
20
20
  ];
21
- function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, operatorLabel, isTrain, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUi, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, }) {
21
+ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, orignLabel, destinationLabel, amenitiesData, setShowDropdown, showDropdown, isExpanded, setIsExpanded, setAmenetiesAtomValue, isCiva, currencySign, isPeru, showRating, showLastSeats, removeDuplicateSeats, isLinatal, viewersConfig, isFeatureDropDownExpand, setIsFeatureDropDownExpand, ticketQuantity, onIncreaseTicketQuantity, onDecreaseTicketQuantity, cityOrigin, cityDestination, isNewUi, onRemateUiButtonClick, selectedTimeSlot, onTimeSlotChange, isTimeDropdownOpen, onTimeDropdownToggle, wowDealData, isFlores, }) {
22
22
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
23
23
  const isItemExpanded = serviceItem.id === isExpanded;
24
24
  const isPetSeat = (Object.keys(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.pet_seat_info) || []).length > 0;
@@ -106,7 +106,7 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
106
106
  : "rounded-[10px] border border-[#ccc]"}`, style: Object.assign(Object.assign({}, serviceCardStyle), { backgroundColor: "#fff" }) },
107
107
  React.createElement("div", { style: {
108
108
  padding: "12px 12px 8px 12px",
109
- marginTop: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) && showTopLabel && isConexion
109
+ marginTop: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_direct_trip) && (showTopLabel || isConexion)
110
110
  ? " 10px"
111
111
  : "",
112
112
  } },
@@ -215,8 +215,6 @@ export interface MobileServiceItemProps {
215
215
  label?: string;
216
216
  icon?: string;
217
217
  };
218
- operatorLabel?: string;
219
- isTrain?: boolean;
220
218
  isFeatureDropDownExpand?: any;
221
219
  setIsFeatureDropDownExpand?: (value: any) => void;
222
220
  ticketQuantity?: number;
@@ -245,13 +245,6 @@ export interface ServiceItemProps {
245
245
  showLoginModal?: any;
246
246
  isLoggedIn?: any;
247
247
  showLoginOption?: boolean;
248
- isTrain?: boolean;
249
- selectedSeatKey?: any;
250
- onSeatSelect?: (key: any, price: number, seatKey: string, apiSeatType?: string) => void;
251
- onTrainButtonClick?: any;
252
- showSeatSelectionError?: string | null;
253
- onShowSeatSelectionError?: (serviceId: string) => void;
254
- onClearSeatSelectionError?: () => void;
255
248
  selectedTimeSlot?: string;
256
249
  onTimeSlotChange?: (slot: string) => void;
257
250
  isTimeDropdownOpen?: string | number | null;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { Modal } from "../../ui/Modal";
3
- import { ThankYouCard, ScoreButtons, FeedbackTextarea, getFeedbackConfig, } from "../../ui/Survey";
3
+ import { ScoreButtons, FeedbackTextarea, getFeedbackConfig, } from "../../ui/Survey";
4
4
  import KuposButton from "../../ui/KuposButton/KuposButton";
5
5
  const SurveyDesktop = ({ isOpen, isSubmitted, selectedScore, onScoreChange, feedback = "", onFeedbackChange, onClose, onSkip, onSubmit, colors, icons, isLoading, }) => {
6
6
  if (!isOpen)
@@ -11,20 +11,21 @@ const SurveyDesktop = ({ isOpen, isSubmitted, selectedScore, onScoreChange, feed
11
11
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(selectedScore, feedback);
12
12
  }
13
13
  };
14
- return (React.createElement(Modal, { isOpen: isOpen, onClose: onClose, variant: "center", size: "lg", maxWidth: 550, padding: isSubmitted ? 0 : "40px 48px 36px", borderRadius: 28, closeOnBackdrop: false }, isSubmitted ? (React.createElement(ThankYouCard, { onClose: onClose })) : (React.createElement(React.Fragment, null,
15
- React.createElement("button", { onClick: onClose, "aria-label": "Close survey", className: "absolute top-[15px] right-[25px] bg-transparent border-none cursor-pointer text-[22px] text-gray-400 flex items-center justify-center p-1 z-10 transition-colors duration-200 hover:text-gray-600" },
16
- React.createElement("img", { src: icons.closeIcon, alt: "Close", className: "w-[16px] h-[16px] block" })),
17
- (icons === null || icons === void 0 ? void 0 : icons.surveyIcon) && (React.createElement("div", { className: "flex justify-center mb-3 mt-2" },
18
- React.createElement("img", { src: icons.surveyIcon, alt: "Survey Illustration", className: "w-[90px] h-[90px] block" }))),
19
- React.createElement("h2", { className: "text-[18px] bold-text leading-[1.25] text-center mt-4 mb-2" }, "Ay\u00FAdanos a mejorar"),
20
- React.createElement("p", { className: "text-[13.33px] text-center leading-[1.4] mb-6 max-w-[460px] mx-auto" },
21
- "Bas\u00E1ndote en tu experiencia de compra.",
22
- React.createElement("br", null),
23
- "\u00BFNos recomendar\u00EDas a un amigo?"),
24
- React.createElement(ScoreButtons, { selectedScore: selectedScore, onScoreChange: onScoreChange, buttonHeight: 45, fontSize: 15, colors: colors }),
25
- React.createElement(FeedbackTextarea, { config: config, feedback: feedback, onFeedbackChange: onFeedbackChange, colors: colors }),
26
- React.createElement("div", { className: "flex justify-center mt-[20px]" },
27
- React.createElement("div", { className: "w-[180px]" },
28
- React.createElement(KuposButton, { isSoldOut: selectedScore == null, isLoading: isLoading || false, buttonColor: "#FF8E43", buyLabel: "Enviar", soldOutLabel: "Enviar", onClick: handleSubmit })))))));
14
+ return (React.createElement(Modal, { isOpen: isOpen, onClose: onClose, variant: "center", size: "lg", maxWidth: 550, padding: isSubmitted ? 0 : "40px 48px 36px", borderRadius: 28, closeOnBackdrop: false },
15
+ React.createElement(React.Fragment, null,
16
+ React.createElement("button", { onClick: onClose, "aria-label": "Close survey", className: "absolute top-[15px] right-[25px] bg-transparent border-none cursor-pointer text-[22px] text-gray-400 flex items-center justify-center p-1 z-10 transition-colors duration-200 hover:text-gray-600" },
17
+ React.createElement("img", { src: icons.closeIcon, alt: "Close", className: "w-[16px] h-[16px] block" })),
18
+ (icons === null || icons === void 0 ? void 0 : icons.surveyIcon) && (React.createElement("div", { className: "flex justify-center mb-3 mt-2" },
19
+ React.createElement("img", { src: icons.surveyIcon, alt: "Survey Illustration", className: "w-[90px] h-[90px] block" }))),
20
+ React.createElement("h2", { className: "text-[18px] bold-text leading-[1.25] text-center mt-4 mb-2" }, "Ay\u00FAdanos a mejorar"),
21
+ React.createElement("p", { className: "text-[13.33px] text-center leading-[1.4] mb-6 max-w-[460px] mx-auto" },
22
+ "Bas\u00E1ndote en tu experiencia de compra.",
23
+ React.createElement("br", null),
24
+ "\u00BFNos recomendar\u00EDas a un amigo?"),
25
+ React.createElement(ScoreButtons, { selectedScore: selectedScore, onScoreChange: onScoreChange, buttonHeight: 45, fontSize: 15, colors: colors }),
26
+ React.createElement(FeedbackTextarea, { config: config, feedback: feedback, onFeedbackChange: onFeedbackChange, colors: colors }),
27
+ React.createElement("div", { className: "flex justify-center mt-[20px]" },
28
+ React.createElement("div", { className: "w-[180px]" },
29
+ React.createElement(KuposButton, { isSoldOut: selectedScore == null, isLoading: isLoading || false, buttonColor: "#FF8E43", buyLabel: "Enviar", soldOutLabel: "Enviar", onClick: handleSubmit }))))));
29
30
  };
30
31
  export default SurveyDesktop;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { BottomSheet } from "../../ui/BottomSheet";
3
- import { ThankYouCard, ScoreButtons, FeedbackTextarea, getFeedbackConfig, } from "../../ui/Survey";
3
+ import { ScoreButtons, FeedbackTextarea, getFeedbackConfig, } from "../../ui/Survey";
4
4
  import KuposButton from "../../ui/KuposButton/KuposButton";
5
5
  const SurveyMobile = ({ isOpen, isSubmitted, selectedScore, onScoreChange, feedback = "", onFeedbackChange, onClose, onSkip, onSubmit, colors, icons, isLoading, }) => {
6
6
  if (!isOpen)
@@ -11,20 +11,21 @@ const SurveyMobile = ({ isOpen, isSubmitted, selectedScore, onScoreChange, feedb
11
11
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(selectedScore, feedback);
12
12
  }
13
13
  };
14
- return (React.createElement(BottomSheet, { isOpen: isOpen !== null && isOpen !== void 0 ? isOpen : false, onClose: onClose, showHandle: true, showBackdrop: false, blurBackground: true, blurAmount: "2px", padding: isSubmitted ? 0 : "0 20px 32px" }, isSubmitted ? (React.createElement(ThankYouCard, { onClose: onClose, titleFontSize: "1.35rem" })) : (React.createElement(React.Fragment, null,
15
- React.createElement("button", { onClick: onClose, "aria-label": "Close survey", className: "absolute top-[15px] right-[25px] bg-transparent border-none cursor-pointer text-[22px] text-gray-400 flex items-center justify-center p-1 z-10 transition-colors duration-200 hover:text-gray-600" },
16
- React.createElement("img", { src: icons.closeIcon, alt: "Close", className: "w-[16px] h-[16px] block" })),
17
- (icons === null || icons === void 0 ? void 0 : icons.surveyIcon) && (React.createElement("div", { className: "flex justify-center mb-3 mt-2" },
18
- React.createElement("img", { src: icons.surveyIcon, alt: "Survey Illustration", className: "w-[90px] h-[90px] block" }))),
19
- React.createElement("h2", { className: "text-[18px] bold-text leading-[1.25] text-center mt-4 mb-2" }, "Ay\u00FAdanos a mejorar"),
20
- React.createElement("p", { className: "text-[13.33px] text-center leading-[1.4] mb-6 max-w-[460px] mx-auto" },
21
- "Bas\u00E1ndote en tu experiencia de compra.",
22
- React.createElement("br", null),
23
- "\u00BFNos recomendar\u00EDas a un amigo?"),
24
- React.createElement(ScoreButtons, { selectedScore: selectedScore, onScoreChange: onScoreChange, buttonHeight: 44, fontSize: 13, gap: 6, colors: colors }),
25
- React.createElement(FeedbackTextarea, { config: config, feedback: feedback, onFeedbackChange: onFeedbackChange }),
26
- React.createElement("div", { className: "flex justify-center mt-[20px]" },
27
- React.createElement("div", { className: "w-[180px]" },
28
- React.createElement(KuposButton, { isSoldOut: selectedScore == null, isLoading: isLoading || false, buttonColor: "#FF8E43", buyLabel: "Enviar", soldOutLabel: "Enviar", onClick: handleSubmit })))))));
14
+ return (React.createElement(BottomSheet, { isOpen: isOpen !== null && isOpen !== void 0 ? isOpen : false, onClose: onClose, showHandle: true, showBackdrop: false, blurBackground: true, blurAmount: "2px", padding: isSubmitted ? 0 : "0 20px 32px" },
15
+ React.createElement(React.Fragment, null,
16
+ React.createElement("button", { onClick: onClose, "aria-label": "Close survey", className: "absolute top-[15px] right-[25px] bg-transparent border-none cursor-pointer text-[22px] text-gray-400 flex items-center justify-center p-1 z-10 transition-colors duration-200 hover:text-gray-600" },
17
+ React.createElement("img", { src: icons.closeIcon, alt: "Close", className: "w-[16px] h-[16px] block" })),
18
+ (icons === null || icons === void 0 ? void 0 : icons.surveyIcon) && (React.createElement("div", { className: "flex justify-center mb-3 mt-2" },
19
+ React.createElement("img", { src: icons.surveyIcon, alt: "Survey Illustration", className: "w-[90px] h-[90px] block" }))),
20
+ React.createElement("h2", { className: "text-[18px] bold-text leading-[1.25] text-center mt-4 mb-2" }, "Ay\u00FAdanos a mejorar"),
21
+ React.createElement("p", { className: "text-[13.33px] text-center leading-[1.4] mb-6 max-w-[460px] mx-auto" },
22
+ "Bas\u00E1ndote en tu experiencia de compra.",
23
+ React.createElement("br", null),
24
+ "\u00BFNos recomendar\u00EDas a un amigo?"),
25
+ React.createElement(ScoreButtons, { selectedScore: selectedScore, onScoreChange: onScoreChange, buttonHeight: 44, fontSize: 13, gap: 6, colors: colors }),
26
+ React.createElement(FeedbackTextarea, { config: config, feedback: feedback, onFeedbackChange: onFeedbackChange }),
27
+ React.createElement("div", { className: "flex justify-center mt-[20px]" },
28
+ React.createElement("div", { className: "w-[180px]" },
29
+ React.createElement(KuposButton, { isSoldOut: selectedScore == null, isLoading: isLoading || false, buttonColor: "#FF8E43", buyLabel: "Enviar", soldOutLabel: "Enviar", onClick: handleSubmit }))))));
29
30
  };
30
31
  export default SurveyMobile;
package/dist/index.d.ts CHANGED
@@ -6,9 +6,13 @@ import KuposUIComponent from "./KuposUIComponent";
6
6
  import { PaymentSideBarDesktop, PaymentSideBarMobile, ResponsivePaymentSideBar } from "./components/PaymentSideBar";
7
7
  import { ServiceListDesktop, ServiceListMobile, ResponsiveServiceList } from "./components/ServiceList";
8
8
  import { FilterBarDesktop, FilterBarMobile, ResponsiveFilterBar } from "./components/FilterBar";
9
- export { ServiceItemDesktop, ServiceItemMobile, ResponsiveServiceItem, ServiceItemPBMobile, KuposUIComponent, PaymentSideBarDesktop, PaymentSideBarMobile, ResponsivePaymentSideBar, ServiceListDesktop, ServiceListMobile, ResponsiveServiceList, FilterBarDesktop, FilterBarMobile, ResponsiveFilterBar, };
9
+ import { SurveyDesktop, SurveyMobile, ResponsiveSurvey } from "./components/Survey";
10
+ import { Modal, ModalHeader } from "./ui/Modal";
11
+ export { ServiceItemDesktop, ServiceItemMobile, ResponsiveServiceItem, ServiceItemPBMobile, KuposUIComponent, PaymentSideBarDesktop, PaymentSideBarMobile, ResponsivePaymentSideBar, ServiceListDesktop, ServiceListMobile, ResponsiveServiceList, FilterBarDesktop, FilterBarMobile, ResponsiveFilterBar, SurveyDesktop, SurveyMobile, ResponsiveSurvey, Modal, ModalHeader, };
10
12
  export type { ServiceItemProps } from "./types";
11
13
  export type { MobileServiceItemProps } from "./components/ServiceItem/mobileTypes";
12
14
  export type { PaymentSideBarProps } from "./components/PaymentSideBar/types";
13
15
  export type { ServiceListProps } from "./components/ServiceList/types";
14
16
  export type { FilterBarProps } from "./components/FilterBar/tyoes";
17
+ export type { SurveyProps } from "./components/Survey/types";
18
+ export type { ModalProps, ModalVariant, ModalSize, ModalHeaderProps } from "./ui/Modal";
package/dist/index.js CHANGED
@@ -9,10 +9,18 @@ import { PaymentSideBarDesktop, PaymentSideBarMobile, ResponsivePaymentSideBar,
9
9
  import { ServiceListDesktop, ServiceListMobile, ResponsiveServiceList, } from "./components/ServiceList";
10
10
  // Import FilterBar components
11
11
  import { FilterBarDesktop, FilterBarMobile, ResponsiveFilterBar, } from "./components/FilterBar";
12
+ // Import Survey components
13
+ import { SurveyDesktop, SurveyMobile, ResponsiveSurvey, } from "./components/Survey";
14
+ // Import Modal components
15
+ import { Modal, ModalHeader } from "./ui/Modal";
12
16
  export { ServiceItemDesktop, ServiceItemMobile, ResponsiveServiceItem, ServiceItemPBMobile, KuposUIComponent,
13
17
  // PaymentSideBar components
14
18
  PaymentSideBarDesktop, PaymentSideBarMobile, ResponsivePaymentSideBar,
15
19
  // ServiceList components
16
20
  ServiceListDesktop, ServiceListMobile, ResponsiveServiceList,
17
21
  // FilterBar components
18
- FilterBarDesktop, FilterBarMobile, ResponsiveFilterBar, };
22
+ FilterBarDesktop, FilterBarMobile, ResponsiveFilterBar,
23
+ //Survey components
24
+ SurveyDesktop, SurveyMobile, ResponsiveSurvey,
25
+ // Modal components
26
+ Modal, ModalHeader, };
package/dist/styles.css CHANGED
@@ -33,9 +33,6 @@
33
33
  .-top-\[11px\] {
34
34
  top: calc(11px * -1);
35
35
  }
36
- .-top-\[12px\] {
37
- top: calc(12px * -1);
38
- }
39
36
  .-top-\[13px\] {
40
37
  top: calc(13px * -1);
41
38
  }
@@ -48,6 +45,9 @@
48
45
  .top-\[5px\] {
49
46
  top: 5px;
50
47
  }
48
+ .top-\[15px\] {
49
+ top: 15px;
50
+ }
51
51
  .top-\[16px\] {
52
52
  top: 16px;
53
53
  }
@@ -75,6 +75,9 @@
75
75
  .right-\[18px\] {
76
76
  right: 18px;
77
77
  }
78
+ .right-\[25px\] {
79
+ right: 25px;
80
+ }
78
81
  .-bottom-\[9\%\] {
79
82
  bottom: calc(9% * -1);
80
83
  }
@@ -387,6 +390,9 @@
387
390
  .h-\[30px\] {
388
391
  height: 30px;
389
392
  }
393
+ .h-\[90px\] {
394
+ height: 90px;
395
+ }
390
396
  .h-\[100\%\] {
391
397
  height: 100%;
392
398
  }
@@ -447,6 +453,9 @@
447
453
  .w-\[80\%\] {
448
454
  width: 80%;
449
455
  }
456
+ .w-\[90px\] {
457
+ width: 90px;
458
+ }
450
459
  .w-\[100\%\] {
451
460
  width: 100%;
452
461
  }
@@ -459,6 +468,9 @@
459
468
  .w-\[150px\] {
460
469
  width: 150px;
461
470
  }
471
+ .w-\[180px\] {
472
+ width: 180px;
473
+ }
462
474
  .w-\[188px\] {
463
475
  width: 188px;
464
476
  }
@@ -497,6 +509,9 @@
497
509
  .max-w-\[220px\] {
498
510
  max-width: 220px;
499
511
  }
512
+ .max-w-\[460px\] {
513
+ max-width: 460px;
514
+ }
500
515
  .max-w-full {
501
516
  max-width: 100%;
502
517
  }
@@ -539,6 +554,9 @@
539
554
  .cursor-pointer {
540
555
  cursor: pointer;
541
556
  }
557
+ .resize {
558
+ resize: both;
559
+ }
542
560
  .\[grid-template-columns\:14\%_40\%_0\.5\%_24\%_13\.5\%\] {
543
561
  grid-template-columns: 14% 40% 0.5% 24% 13.5%;
544
562
  }
@@ -999,9 +1017,6 @@
999
1017
  .text-right {
1000
1018
  text-align: right;
1001
1019
  }
1002
- .text-\[9px\] {
1003
- font-size: 9px;
1004
- }
1005
1020
  .text-\[10px\] {
1006
1021
  font-size: 10px;
1007
1022
  }
@@ -1054,6 +1069,14 @@
1054
1069
  --tw-leading: 1.3;
1055
1070
  line-height: 1.3;
1056
1071
  }
1072
+ .leading-\[1\.4\] {
1073
+ --tw-leading: 1.4;
1074
+ line-height: 1.4;
1075
+ }
1076
+ .leading-\[1\.25\] {
1077
+ --tw-leading: 1.25;
1078
+ line-height: 1.25;
1079
+ }
1057
1080
  .leading-\[14px\] {
1058
1081
  --tw-leading: 14px;
1059
1082
  line-height: 14px;
@@ -1154,6 +1177,9 @@
1154
1177
  .uppercase {
1155
1178
  text-transform: uppercase;
1156
1179
  }
1180
+ .italic {
1181
+ font-style: italic;
1182
+ }
1157
1183
  .tabular-nums {
1158
1184
  --tw-numeric-spacing: tabular-nums;
1159
1185
  font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
@@ -3,8 +3,6 @@ interface SeatType {
3
3
  label: string;
4
4
  fare: number;
5
5
  key: any;
6
- apiSeatType?: string;
7
- api_seat_type?: string;
8
6
  }
9
7
  interface SeatSectionProps {
10
8
  seatTypes: SeatType[];
@@ -18,10 +16,6 @@ interface SeatSectionProps {
18
16
  serviceItem?: any;
19
17
  renderIcon?: (iconKey: string, size?: string) => React.ReactNode;
20
18
  discountSeatPriceColor?: string;
21
- isTrain?: boolean;
22
- selectedSeatKey?: any;
23
- onSeatSelect?: (key: any, price: number, seatKey: string, apiSeatType?: string) => void;
24
- topLabelColor?: string;
25
19
  }
26
- declare function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, selectedSeatKey, onSeatSelect, isPeru, serviceItem, renderIcon, dpSeatColor, discountSeatPriceColor, isTrain, topLabelColor, }: SeatSectionProps): React.ReactElement;
20
+ declare function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, renderIcon, dpSeatColor, discountSeatPriceColor, }: SeatSectionProps): React.ReactElement;
27
21
  export default SeatSection;
@@ -8,13 +8,11 @@ function getAllSeatTypes(seatTypes) {
8
8
  let seatTypesWithPrices = seatTypes.filter(Boolean).map((val) => ({
9
9
  label: val === null || val === void 0 ? void 0 : val.label,
10
10
  price: val === null || val === void 0 ? void 0 : val.fare,
11
- key: val === null || val === void 0 ? void 0 : val.key,
12
- apiSeatType: (val === null || val === void 0 ? void 0 : val.apiSeatType) || (val === null || val === void 0 ? void 0 : val.api_seat_type),
13
11
  }));
14
12
  seatTypesWithPrices.sort((a, b) => a.price - b.price);
15
13
  return seatTypesWithPrices;
16
14
  }
17
- function getSortedSeatTypes(seatTypes, isTrain) {
15
+ function getSortedSeatTypes(seatTypes) {
18
16
  if (!(seatTypes === null || seatTypes === void 0 ? void 0 : seatTypes.length)) {
19
17
  return [{ label: "Salon cama", price: 0 }];
20
18
  }
@@ -23,9 +21,7 @@ function getSortedSeatTypes(seatTypes, isTrain) {
23
21
  if (premiumIndex >= 3) {
24
22
  seatTypesWithPrices[2] = seatTypesWithPrices[premiumIndex];
25
23
  }
26
- if (!isTrain) {
27
- seatTypesWithPrices = seatTypesWithPrices.slice(0, 2);
28
- }
24
+ seatTypesWithPrices = seatTypesWithPrices.slice(0, 2);
29
25
  const seenPrices = new Set();
30
26
  seatTypesWithPrices = seatTypesWithPrices.filter((seat) => {
31
27
  if (seenPrices.has(seat.price))
@@ -58,10 +54,10 @@ function getUniqueSeats(seatTypes) {
58
54
  function getNumberOfSeats(seatTypes) {
59
55
  return seatTypes.filter((val) => !SEAT_EXCEPTIONS.includes(val.label)).length;
60
56
  }
61
- function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, selectedSeatKey, onSeatSelect, isPeru, serviceItem, renderIcon, dpSeatColor, discountSeatPriceColor, isTrain, topLabelColor, }) {
57
+ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, renderIcon, dpSeatColor, discountSeatPriceColor, }) {
62
58
  var _a;
63
59
  const uniqueSeats = getUniqueSeats(seatTypes);
64
- const sortedSeatTypes = getSortedSeatTypes(seatTypes, isTrain);
60
+ const sortedSeatTypes = getSortedSeatTypes(seatTypes);
65
61
  const numberOfSeats = getNumberOfSeats(seatTypes);
66
62
  const isCentered = numberOfSeats < 2 || removeDuplicateSeats;
67
63
  const formatPrice = (price) => availableSeats <= 0
@@ -69,36 +65,11 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
69
65
  : CommonService.currency(price, currencySign);
70
66
  const renderSeatNames = () => {
71
67
  const seats = removeDuplicateSeats ? uniqueSeats : sortedSeatTypes;
72
- return seats.map((val, key) => {
73
- return SEAT_EXCEPTIONS.includes(val.label) ? null : (React.createElement("div", { className: "flex items-center", style: isTrain ? { cursor: "pointer" } : undefined, onClick: isTrain && !isSoldOut
74
- ? () => val.label === selectedSeatKey
75
- ? onSeatSelect === null || onSeatSelect === void 0 ? void 0 : onSeatSelect(null, 0, "", "")
76
- : onSeatSelect === null || onSeatSelect === void 0 ? void 0 : onSeatSelect(val.label, val.price, val.key, val.apiSeatType)
77
- : undefined },
78
- isTrain && (React.createElement("div", { style: {
79
- border: `1px solid ${val.label === selectedSeatKey ? topLabelColor : "#ccc"}`,
80
- borderRadius: "50%",
81
- width: "14px",
82
- height: "14px",
83
- minWidth: "14px",
84
- marginRight: "10px",
85
- display: "flex",
86
- alignItems: "center",
87
- justifyContent: "center",
88
- } }, val.label === selectedSeatKey && (React.createElement("div", { style: {
89
- backgroundColor: topLabelColor,
90
- borderRadius: "50%",
91
- width: "7px",
92
- height: "7px",
93
- } })))),
94
- React.createElement("span", { key: key, className: `flex items-center justify-between text-[13.33px] ${isSoldOut ? "text-[#c0c0c0]" : ""}` }, typeof val.label === "string" || typeof val.label === "number"
95
- ? removeDuplicateSeats && isPeru
96
- ? CommonService.truncateSeatLabel(val.label)
97
- : isTrain
98
- ? CommonService.truncateSeatLabel(CommonService.capitalize(String(val.label)), 8)
99
- : val.label
100
- : null)));
101
- });
68
+ return seats.map((val, key) => SEAT_EXCEPTIONS.includes(val.label) ? null : (React.createElement("span", { key: key, className: `flex items-center justify-between text-[13.33px] ${isSoldOut ? "text-[#c0c0c0]" : ""}` }, typeof val.label === "string" || typeof val.label === "number"
69
+ ? removeDuplicateSeats && isPeru
70
+ ? CommonService.truncateSeatLabel(val.label)
71
+ : val.label
72
+ : null)));
102
73
  };
103
74
  const renderSeatPrices = () => {
104
75
  if (isPeru) {
@@ -22,7 +22,6 @@ interface DateTimeSectionMobileProps {
22
22
  tooltipBgColor?: string;
23
23
  showLastSeats?: boolean;
24
24
  discountSeatPriceColor?: string;
25
- isTrain?: boolean;
26
25
  }
27
- declare function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal, isPeru, orignLabel, destinationLabel, originIcon, destinationIcon, travelDate, arrivalDate, depTime, arrTime, seatTypes, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, showLastSeats, discountSeatPriceColor, isTrain, }: DateTimeSectionMobileProps): React.ReactElement;
26
+ declare function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal, isPeru, orignLabel, destinationLabel, originIcon, destinationIcon, travelDate, arrivalDate, depTime, arrTime, seatTypes, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, showLastSeats, discountSeatPriceColor, }: DateTimeSectionMobileProps): React.ReactElement;
28
27
  export default DateTimeSectionMobile;
@@ -23,10 +23,8 @@ const getCleanedDepTime = (raw) => {
23
23
  };
24
24
  const TimeRow = ({ label, icon, alt, date, timeContent, isSoldOut, }) => {
25
25
  const formattedDate = DateService.getServiceItemDate(date);
26
- const dotPositionClass = formattedDate.includes("dom")
27
- ? "max-[399px]:left-[53%]"
28
- : "";
29
- return (React.createElement("div", { className: `flex items-center min-[420]:text-[13px] text-[12px] justify-between ${isSoldOut ? "text-[#c0c0c0]" : ""}` },
26
+ const dotPositionClass = formattedDate.includes("dom") ? "max-[399px]:left-[53%]" : "";
27
+ return React.createElement("div", { className: `flex items-center min-[420]:text-[13px] text-[12px] justify-between ${isSoldOut ? "text-[#c0c0c0]" : ""}` },
30
28
  React.createElement("div", { className: "flex items-center", style: { flex: 1 } },
31
29
  React.createElement("div", null,
32
30
  " ",
@@ -35,9 +33,9 @@ const TimeRow = ({ label, icon, alt, date, timeContent, isSoldOut, }) => {
35
33
  React.createElement("div", { className: "flex items-center relative capitalize justify-between", style: { flex: 1 } },
36
34
  React.createElement("span", { className: "cursor-pointer black-text" }, formattedDate),
37
35
  React.createElement("div", { className: `absolute left-[50%] ${dotPositionClass}` }, "\u2022"),
38
- React.createElement("div", { className: "font-[900] relative black-text" }, timeContent)))));
36
+ React.createElement("div", { className: "font-[900] relative black-text" }, timeContent))));
39
37
  };
40
- function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal, isPeru, orignLabel, destinationLabel, originIcon, destinationIcon, travelDate, arrivalDate, depTime, arrTime, seatTypes, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, showLastSeats, discountSeatPriceColor, isTrain, }) {
38
+ function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal, isPeru, orignLabel, destinationLabel, originIcon, destinationIcon, travelDate, arrivalDate, depTime, arrTime, seatTypes, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, showLastSeats, discountSeatPriceColor, }) {
41
39
  const { cleaned: cleanedDepTime, hasAM, hasPM } = getCleanedDepTime(depTime);
42
40
  const depTimeContent = isLinatal ? (React.createElement("div", null,
43
41
  React.createElement("span", null,
@@ -49,11 +47,7 @@ function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal
49
47
  ? null
50
48
  : DateService.ampmOnly(depTime)))) : (DateService.formatTime(depTime));
51
49
  return (React.createElement("div", { className: "flex justify-between gap-[5px] w-full", onClick: onBookButtonPress },
52
- React.createElement("div", { className: `flex flex-col gap-[4px] w-[50%] ${isTrain ? "justify-center" : "justify-between"}`, style: {
53
- justifyContent: isCiva && "center",
54
- minHeight: isTrain ? undefined : "2.5rem",
55
- alignSelf: isTrain ? "stretch" : undefined,
56
- } },
50
+ React.createElement("div", { className: "min-h-[2.5rem] flex flex-col justify-between gap-[4px] w-[50%] ", style: { justifyContent: isCiva && "center" } },
57
51
  React.createElement(TimeRow, { label: orignLabel, icon: originIcon, alt: "origin", date: travelDate, timeContent: depTimeContent, isSoldOut: isSoldOut }),
58
52
  isCiva ? null : (React.createElement(TimeRow, { label: destinationLabel, icon: destinationIcon, alt: "destination", date: arrivalDate, timeContent: DateService.formatTime(arrTime), isSoldOut: isSoldOut }))),
59
53
  React.createElement("div", { style: {
@@ -62,6 +56,6 @@ function DateTimeSectionMobile({ onBookButtonPress, isCiva, isSoldOut, isLinatal
62
56
  backgroundColor: "#ccc",
63
57
  margin: "auto",
64
58
  } }),
65
- React.createElement(SeatSectionMobile, { seatTypes: seatTypes, isSoldOut: isSoldOut, isPeru: isPeru, seatPriceColor: seatPriceColor, currencySign: currencySign, availableSeats: availableSeats, removeDuplicateSeats: removeDuplicateSeats, serviceItem: serviceItem, tooltipBgColor: tooltipBgColor, showLastSeats: showLastSeats, discountSeatPriceColor: discountSeatPriceColor, isTrain: isTrain })));
59
+ React.createElement(SeatSectionMobile, { seatTypes: seatTypes, isSoldOut: isSoldOut, isPeru: isPeru, seatPriceColor: seatPriceColor, currencySign: currencySign, availableSeats: availableSeats, removeDuplicateSeats: removeDuplicateSeats, serviceItem: serviceItem, tooltipBgColor: tooltipBgColor, showLastSeats: showLastSeats, discountSeatPriceColor: discountSeatPriceColor })));
66
60
  }
67
61
  export default DateTimeSectionMobile;
@@ -16,7 +16,6 @@ interface SeatSectionMobileProps {
16
16
  tooltipBgColor?: string;
17
17
  showLastSeats?: boolean;
18
18
  discountSeatPriceColor?: string;
19
- isTrain?: boolean;
20
19
  }
21
- declare function SeatSectionMobile({ seatTypes: seatTypesData, isSoldOut, isPeru, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, showLastSeats, discountSeatPriceColor, isTrain, }: SeatSectionMobileProps): React.ReactElement;
20
+ declare function SeatSectionMobile({ seatTypes: seatTypesData, isSoldOut, isPeru, seatPriceColor, currencySign, availableSeats, removeDuplicateSeats, serviceItem, tooltipBgColor, showLastSeats, discountSeatPriceColor, }: SeatSectionMobileProps): React.ReactElement;
22
21
  export default SeatSectionMobile;