mautourco-components 0.2.18 → 0.2.20

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 (185) hide show
  1. package/dist/components/atoms/Icon/icons/BookingIcon.d.ts +4 -0
  2. package/dist/components/atoms/Icon/icons/BookingIcon.js +36 -0
  3. package/dist/components/atoms/Icon/icons/BusIcon.js +1 -1
  4. package/dist/components/atoms/Icon/icons/CarFront.d.ts +4 -0
  5. package/dist/components/atoms/Icon/icons/CarFront.js +36 -0
  6. package/dist/components/atoms/Icon/icons/CatamaranIcon.d.ts +4 -0
  7. package/dist/components/atoms/Icon/icons/CatamaranIcon.js +36 -0
  8. package/dist/components/atoms/Icon/icons/ClockIcon.d.ts +4 -0
  9. package/dist/components/atoms/Icon/icons/ClockIcon.js +36 -0
  10. package/dist/components/atoms/Icon/icons/CloseCircleIcon.d.ts +4 -0
  11. package/dist/components/atoms/Icon/icons/CloseCircleIcon.js +36 -0
  12. package/dist/components/atoms/Icon/icons/Land.d.ts +4 -0
  13. package/dist/components/atoms/Icon/icons/Land.js +36 -0
  14. package/dist/components/atoms/Icon/icons/MapIcon.js +1 -1
  15. package/dist/components/atoms/Icon/icons/PlusCircleIcon.js +1 -1
  16. package/dist/components/atoms/Icon/icons/SeaIcon.d.ts +4 -0
  17. package/dist/components/atoms/Icon/icons/SeaIcon.js +36 -0
  18. package/dist/components/atoms/Icon/icons/registry.d.ts +7 -0
  19. package/dist/components/atoms/Icon/icons/registry.js +14 -0
  20. package/dist/components/atoms/Inputs/Input/Input.d.ts +2 -1
  21. package/dist/components/atoms/Inputs/Input/Input.js +1 -1
  22. package/dist/components/atoms/Inputs/Textarea/Textarea.d.ts +3 -1
  23. package/dist/components/atoms/Inputs/Textarea/Textarea.js +7 -5
  24. package/dist/components/molecules/BookingPax/BookingPax.d.ts +7 -0
  25. package/dist/components/molecules/BookingPax/BookingPax.js +21 -0
  26. package/dist/components/molecules/BookingPax/BookingPaxAccom.d.ts +22 -0
  27. package/dist/components/molecules/BookingPax/BookingPaxAccom.js +61 -0
  28. package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.css +2090 -0
  29. package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.d.ts +31 -0
  30. package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.js +96 -0
  31. package/dist/components/molecules/BookingPax/BookingPaxExcursion.d.ts +14 -0
  32. package/dist/components/molecules/BookingPax/BookingPaxExcursion.js +31 -0
  33. package/dist/components/molecules/BookingPax/BookingPaxHeader.d.ts +16 -0
  34. package/dist/components/molecules/BookingPax/BookingPaxHeader.js +28 -0
  35. package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.css +2103 -0
  36. package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.d.ts +11 -0
  37. package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.js +19 -0
  38. package/dist/components/molecules/BookingPax/BookingPaxRemarks.d.ts +5 -0
  39. package/dist/components/molecules/BookingPax/BookingPaxRemarks.js +37 -0
  40. package/dist/components/molecules/BookingPax/BookingPaxTransfer.d.ts +18 -0
  41. package/dist/components/molecules/BookingPax/BookingPaxTransfer.js +40 -0
  42. package/dist/components/molecules/BookingPax/index.d.ts +5 -0
  43. package/dist/components/molecules/BookingPax/index.js +1 -0
  44. package/dist/components/molecules/BookingResume/BookingResume.d.ts +9 -0
  45. package/dist/components/molecules/BookingResume/BookingResume.js +25 -0
  46. package/dist/components/molecules/BookingResume/BookingResumeLayout/BookingResumeLayout.css +2107 -0
  47. package/dist/components/molecules/BookingResume/BookingResumeLayout/BookingResumeLayout.d.ts +11 -0
  48. package/dist/components/molecules/BookingResume/BookingResumeLayout/BookingResumeLayout.js +19 -0
  49. package/dist/components/molecules/BookingResume/ResumeAccom/ResumeAccom.css +2094 -0
  50. package/dist/components/molecules/BookingResume/ResumeAccom/ResumeAccom.d.ts +13 -0
  51. package/dist/components/molecules/BookingResume/ResumeAccom/ResumeAccom.js +26 -0
  52. package/dist/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.css +2082 -0
  53. package/dist/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.d.ts +15 -0
  54. package/dist/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.js +28 -0
  55. package/dist/components/molecules/BookingResume/ResumeOtherService.d.ts +6 -0
  56. package/dist/components/molecules/BookingResume/ResumeOtherService.js +19 -0
  57. package/dist/components/molecules/BookingResume/ResumeTransfer.d.ts +12 -0
  58. package/dist/components/molecules/BookingResume/ResumeTransfer.js +23 -0
  59. package/dist/components/molecules/BookingResume/index.d.ts +6 -0
  60. package/dist/components/molecules/BookingResume/index.js +1 -0
  61. package/dist/components/molecules/Calendar/CalendarInput.d.ts +6 -3
  62. package/dist/components/molecules/Calendar/CalendarInput.js +10 -10
  63. package/dist/components/molecules/DateDisplay/DateDisplay.d.ts +2 -0
  64. package/dist/components/molecules/DateDisplay/DateDisplay.js +2 -2
  65. package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.css +2142 -0
  66. package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.d.ts +11 -0
  67. package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.js +19 -0
  68. package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.d.ts +9 -0
  69. package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.js +24 -0
  70. package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.d.ts +17 -0
  71. package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.js +20 -0
  72. package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.d.ts +11 -0
  73. package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.js +33 -0
  74. package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.d.ts +11 -0
  75. package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.js +27 -0
  76. package/dist/components/molecules/DialogContentPolicy/index.d.ts +4 -0
  77. package/dist/components/molecules/DialogContentPolicy/index.js +1 -0
  78. package/dist/components/molecules/PaxDisplay/PaxDisplay.css +2104 -0
  79. package/dist/components/molecules/PaxDisplay/PaxDisplay.d.ts +7 -0
  80. package/dist/components/molecules/PaxDisplay/PaxDisplay.js +32 -0
  81. package/dist/components/molecules/ServiceInfo/ServiceInfo.css +3 -7
  82. package/dist/components/molecules/ServiceInfo/ServiceInfo.d.ts +1 -0
  83. package/dist/components/molecules/ServiceInfo/ServiceInfo.js +5 -4
  84. package/dist/components/molecules/ServiceTitle/ServiceTitle.css +3 -0
  85. package/dist/components/molecules/ServiceTitle/ServiceTitle.d.ts +7 -1
  86. package/dist/components/molecules/ServiceTitle/ServiceTitle.js +4 -3
  87. package/dist/components/molecules/StepperTimeline/StepperTimeline.css +2151 -0
  88. package/dist/components/molecules/StepperTimeline/StepperTimeline.d.ts +23 -0
  89. package/dist/components/molecules/StepperTimeline/StepperTimeline.js +45 -0
  90. package/dist/components/organisms/Booking/Booking.css +2080 -0
  91. package/dist/components/organisms/Booking/Booking.d.ts +13 -0
  92. package/dist/components/organisms/Booking/Booking.js +37 -0
  93. package/dist/components/organisms/Booking/BookingDocket/BookingDocket.css +2159 -0
  94. package/dist/components/organisms/Booking/BookingDocket/BookingDocket.d.ts +13 -0
  95. package/dist/components/organisms/Booking/BookingDocket/BookingDocket.js +44 -0
  96. package/dist/components/organisms/Booking/BookingHeader.d.ts +8 -0
  97. package/dist/components/organisms/Booking/BookingHeader.js +17 -0
  98. package/dist/components/organisms/Booking/BookingPaxList.d.ts +25 -0
  99. package/dist/components/organisms/Booking/BookingPaxList.js +117 -0
  100. package/dist/components/organisms/Booking/BookingStep/BookingStep.css +2103 -0
  101. package/dist/components/organisms/Booking/BookingStep/BookingStep.d.ts +11 -0
  102. package/dist/components/organisms/Booking/BookingStep/BookingStep.js +30 -0
  103. package/dist/components/organisms/Booking/index.d.ts +3 -0
  104. package/dist/components/organisms/Booking/index.js +1 -0
  105. package/dist/components/organisms/DateTimePicker/DateTimePicker.d.ts +6 -3
  106. package/dist/components/organisms/DateTimePicker/DateTimePicker.js +28 -22
  107. package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.d.ts +10 -0
  108. package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.js +17 -0
  109. package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.js +2 -8
  110. package/dist/components/ui/checkbox.d.ts +4 -0
  111. package/dist/components/ui/checkbox.js +31 -0
  112. package/dist/hooks/useBookingPax.d.ts +8 -0
  113. package/dist/hooks/useBookingPax.js +43 -0
  114. package/dist/hooks/useStays.d.ts +1 -0
  115. package/dist/hooks/useStays.js +11 -0
  116. package/dist/index.d.ts +3 -0
  117. package/dist/index.js +3 -0
  118. package/dist/types/table/booking.types.d.ts +12 -0
  119. package/dist/types/table/detail-resume.types.d.ts +3 -1
  120. package/package.json +4 -1
  121. package/src/components/atoms/Icon/icons/BookingIcon.tsx +40 -0
  122. package/src/components/atoms/Icon/icons/BusIcon.tsx +1 -1
  123. package/src/components/atoms/Icon/icons/CarFront.tsx +44 -0
  124. package/src/components/atoms/Icon/icons/CatamaranIcon.tsx +51 -0
  125. package/src/components/atoms/Icon/icons/ClockIcon.tsx +46 -0
  126. package/src/components/atoms/Icon/icons/CloseCircleIcon.tsx +55 -0
  127. package/src/components/atoms/Icon/icons/Land.tsx +40 -0
  128. package/src/components/atoms/Icon/icons/MapIcon.tsx +6 -2
  129. package/src/components/atoms/Icon/icons/PlusCircleIcon.tsx +1 -1
  130. package/src/components/atoms/Icon/icons/SeaIcon.tsx +47 -0
  131. package/src/components/atoms/Icon/icons/registry.tsx +14 -0
  132. package/src/components/atoms/Inputs/Input/Input.tsx +6 -5
  133. package/src/components/atoms/Inputs/Textarea/Textarea.tsx +18 -4
  134. package/src/components/molecules/BookingPax/BookingPax.tsx +12 -0
  135. package/src/components/molecules/BookingPax/BookingPaxAccom.tsx +120 -0
  136. package/src/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.css +4 -0
  137. package/src/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.tsx +188 -0
  138. package/src/components/molecules/BookingPax/BookingPaxExcursion.tsx +77 -0
  139. package/src/components/molecules/BookingPax/BookingPaxHeader.tsx +47 -0
  140. package/src/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.css +15 -0
  141. package/src/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.tsx +25 -0
  142. package/src/components/molecules/BookingPax/BookingPaxRemarks.tsx +46 -0
  143. package/src/components/molecules/BookingPax/BookingPaxTransfer.tsx +121 -0
  144. package/src/components/molecules/BookingPax/index.ts +9 -0
  145. package/src/components/molecules/BookingResume/BookingResume.tsx +16 -0
  146. package/src/components/molecules/BookingResume/BookingResumeLayout/BookingResumeLayout.css +28 -0
  147. package/src/components/molecules/BookingResume/BookingResumeLayout/BookingResumeLayout.tsx +37 -0
  148. package/src/components/molecules/BookingResume/ResumeAccom/ResumeAccom.css +12 -0
  149. package/src/components/molecules/BookingResume/ResumeAccom/ResumeAccom.tsx +63 -0
  150. package/src/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.css +5 -0
  151. package/src/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.tsx +75 -0
  152. package/src/components/molecules/BookingResume/ResumeOtherService.tsx +21 -0
  153. package/src/components/molecules/BookingResume/ResumeTransfer.tsx +49 -0
  154. package/src/components/molecules/BookingResume/index.ts +6 -0
  155. package/src/components/molecules/Calendar/CalendarInput.tsx +26 -24
  156. package/src/components/molecules/DateDisplay/DateDisplay.tsx +9 -5
  157. package/src/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.css +37 -0
  158. package/src/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.tsx +28 -0
  159. package/src/components/molecules/DialogContentPolicy/DialogCancellationAccom.tsx +65 -0
  160. package/src/components/molecules/DialogContentPolicy/DialogCancellationExcursion.tsx +59 -0
  161. package/src/components/molecules/DialogContentPolicy/DialogCancellationList.tsx +49 -0
  162. package/src/components/molecules/DialogContentPolicy/DialogContentPolicy.tsx +45 -0
  163. package/src/components/molecules/DialogContentPolicy/index.ts +5 -0
  164. package/src/components/molecules/PaxDisplay/PaxDisplay.css +19 -0
  165. package/src/components/molecules/PaxDisplay/PaxDisplay.tsx +59 -0
  166. package/src/components/molecules/ServiceInfo/ServiceInfo.css +3 -5
  167. package/src/components/molecules/ServiceInfo/ServiceInfo.tsx +18 -3
  168. package/src/components/molecules/ServiceTitle/ServiceTitle.css +1 -1
  169. package/src/components/molecules/ServiceTitle/ServiceTitle.tsx +25 -7
  170. package/src/components/molecules/StepperTimeline/StepperTimeline.css +59 -0
  171. package/src/components/molecules/StepperTimeline/StepperTimeline.tsx +105 -0
  172. package/src/components/organisms/Booking/Booking.css +3 -0
  173. package/src/components/organisms/Booking/Booking.tsx +25 -0
  174. package/src/components/organisms/Booking/BookingDocket/BookingDocket.css +67 -0
  175. package/src/components/organisms/Booking/BookingDocket/BookingDocket.tsx +165 -0
  176. package/src/components/organisms/Booking/BookingHeader.tsx +24 -0
  177. package/src/components/organisms/Booking/BookingPaxList.tsx +224 -0
  178. package/src/components/organisms/Booking/BookingStep/BookingStep.css +12 -0
  179. package/src/components/organisms/Booking/BookingStep/BookingStep.tsx +51 -0
  180. package/src/components/organisms/Booking/index.ts +3 -0
  181. package/src/components/organisms/CarBookingCard/index.ts +1 -0
  182. package/src/components/organisms/DateTimePicker/DateTimePicker.tsx +69 -49
  183. package/src/components/organisms/DialogBookingConfirm/DialogBookingConfirm.tsx +25 -0
  184. package/src/components/organisms/TabCancellationPolicy/HeaderAccom.tsx +2 -8
  185. package/src/components/ui/checkbox.tsx +32 -0
@@ -0,0 +1,63 @@
1
+ import useStays from '@/src/hooks/useStays';
2
+ import { RoomItem } from '@/src/types/table';
3
+ import { BookingPax } from '@/src/types/table/booking.types';
4
+ import React from 'react';
5
+ import { Text } from '../../../atoms/Typography/Typography';
6
+ import { DateDisplay } from '../../DateDisplay/DateDisplay';
7
+ import { PaxDisplay } from '../../PaxDisplay/PaxDisplay';
8
+ import { ServiceInfo } from '../../ServiceInfo/ServiceInfo';
9
+ import { ServiceTitle } from '../../ServiceTitle/ServiceTitle';
10
+ import TextWithIcon from '../../TextWithIcon/TextWithIcon';
11
+ import { BookingResumeLayout } from '../BookingResumeLayout/BookingResumeLayout';
12
+ import './ResumeAccom.css';
13
+
14
+ export interface ResumeAccomProps {
15
+ image: string;
16
+ dates: string[];
17
+ clientType: string;
18
+ pax: BookingPax;
19
+ hotelName: string;
20
+ rooms: Partial<RoomItem>[];
21
+ }
22
+
23
+ export const ResumeAccom: React.FC<ResumeAccomProps> = (props) => {
24
+ const { image, dates, clientType, pax, rooms, hotelName } = props;
25
+
26
+ const stay = useStays(dates);
27
+
28
+ return (
29
+ <BookingResumeLayout
30
+ title="Accommodation"
31
+ icon="accom"
32
+ image={image}
33
+ className="resume-accom">
34
+ <ServiceTitle title={hotelName} />
35
+ <div className="space-y-2 mt-4">
36
+ <DateDisplay dates={dates} textColor="accent" />
37
+ <TextWithIcon icon="night">{stay} Nights</TextWithIcon>
38
+ <Text variant="medium" size="sm" leading="4">
39
+ <strong>Client types:</strong> {clientType}
40
+ </Text>
41
+ <PaxDisplay pax={pax} />
42
+ <div>
43
+ {rooms.map((room, index) => (
44
+ <div key={`rm-${index}`} className="space-y-1">
45
+ <TextWithIcon icon="accom" textSize="sm" textVariant="medium">
46
+ {room.RoomName}
47
+ </TextWithIcon>
48
+ <ServiceInfo.Item
49
+ icon="utensils"
50
+ iconSize="sm"
51
+ textSize="sm"
52
+ textLeading="4"
53
+ textVariant="medium"
54
+ label="Meal-Plan">
55
+ {room.MealPlan}
56
+ </ServiceInfo.Item>
57
+ </div>
58
+ ))}
59
+ </div>
60
+ </div>
61
+ </BookingResumeLayout>
62
+ );
63
+ };
@@ -0,0 +1,5 @@
1
+ .resume-excursion {
2
+ .service-info__item-label {
3
+ flex: 0 0 108px;
4
+ }
5
+ }
@@ -0,0 +1,75 @@
1
+ import { BookingPax } from '@/src/types/table/booking.types';
2
+ import React from 'react';
3
+ import { Text } from '../../../atoms/Typography/Typography';
4
+ import { DateDisplay } from '../../DateDisplay/DateDisplay';
5
+ import { PaxDisplay } from '../../PaxDisplay/PaxDisplay';
6
+ import { ServiceInfo } from '../../ServiceInfo/ServiceInfo';
7
+ import TextWithIcon from '../../TextWithIcon/TextWithIcon';
8
+ import { BookingResumeLayout } from '../BookingResumeLayout/BookingResumeLayout';
9
+ import './ResumeExcursion.css';
10
+
11
+ export interface ResumeExcursionProps {
12
+ image: string;
13
+ date: string;
14
+ pax: BookingPax;
15
+ pickUpPoint: string;
16
+ duration: string;
17
+ meal: string;
18
+ accessibility: string;
19
+ transferType: string;
20
+ type: 'sea' | 'land' | 'catamaran';
21
+ }
22
+
23
+ const mapType: Record<ResumeExcursionProps['type'], string> = {
24
+ sea: 'Sea excursion',
25
+ land: 'Land excursion',
26
+ catamaran: 'Cruise excursion',
27
+ };
28
+
29
+ export const ResumeExcursion: React.FC<ResumeExcursionProps> = (props) => {
30
+ const {
31
+ image,
32
+ date,
33
+ pax,
34
+ pickUpPoint,
35
+ duration,
36
+ meal,
37
+ accessibility,
38
+ transferType,
39
+ type,
40
+ } = props;
41
+ return (
42
+ <BookingResumeLayout
43
+ title="Excursion"
44
+ icon="map"
45
+ image={image}
46
+ className="resume-excursion">
47
+ <div className="space-y-3">
48
+ <DateDisplay dates={[date]} textColor="accent" />
49
+ <div className="space-y-1">
50
+ <TextWithIcon icon={type} textSize="sm" textVariant="medium">
51
+ {mapType[type]}
52
+ </TextWithIcon>
53
+ <Text variant="medium" size="sm" leading="4">
54
+ <strong>Pickup: </strong> {pickUpPoint}
55
+ </Text>
56
+ </div>
57
+ <PaxDisplay pax={pax} />
58
+ <ServiceInfo className="space-y-1" contentTextVariant="regular">
59
+ <ServiceInfo.Item icon="stopwatch" label="Duration">
60
+ {duration}
61
+ </ServiceInfo.Item>
62
+ <ServiceInfo.Item icon="utensils" label="Meal">
63
+ {meal}
64
+ </ServiceInfo.Item>
65
+ <ServiceInfo.Item icon="bike" label="Difficulty">
66
+ {accessibility}
67
+ </ServiceInfo.Item>
68
+ <ServiceInfo.Item icon="car" label="Vehicle">
69
+ {transferType}
70
+ </ServiceInfo.Item>
71
+ </ServiceInfo>
72
+ </div>
73
+ </BookingResumeLayout>
74
+ );
75
+ };
@@ -0,0 +1,21 @@
1
+ import { BookingPax } from '@/src/types/table/booking.types';
2
+ import React from 'react';
3
+ import { PaxDisplay } from '../PaxDisplay/PaxDisplay';
4
+ import TextWithIcon from '../TextWithIcon/TextWithIcon';
5
+ import { BookingResumeLayout } from './BookingResumeLayout/BookingResumeLayout';
6
+
7
+ export interface ResumeOtherServiceProps {
8
+ pax: BookingPax;
9
+ }
10
+
11
+ export const ResumeOtherService: React.FC<ResumeOtherServiceProps> = (props) => {
12
+ const { pax } = props;
13
+ return (
14
+ <BookingResumeLayout title="Other Services" icon="more">
15
+ <div className="space-y-1">
16
+ <TextWithIcon icon="wallet">Handling Fee</TextWithIcon>
17
+ <PaxDisplay pax={pax} />
18
+ </div>
19
+ </BookingResumeLayout>
20
+ );
21
+ };
@@ -0,0 +1,49 @@
1
+ import { BookingPax } from '@/src/types/table/booking.types';
2
+ import React from 'react';
3
+ import { Text } from '../../atoms/Typography/Typography';
4
+ import { DateDisplay } from '../DateDisplay/DateDisplay';
5
+ import FromTo, { FromToProps } from '../FromTo/FromTo';
6
+ import { PaxDisplay } from '../PaxDisplay/PaxDisplay';
7
+ import TextWithIcon from '../TextWithIcon/TextWithIcon';
8
+ import { BookingResumeLayout } from './BookingResumeLayout/BookingResumeLayout';
9
+
10
+ export interface ResumeTransferProps {
11
+ type: 'ARV' | 'DEP' | 'INH';
12
+ pax: BookingPax;
13
+ date: string;
14
+ location: Omit<FromToProps, 'transferType'>;
15
+ carName: string;
16
+ image: string;
17
+ }
18
+
19
+ export const ResumeTransfer: React.FC<ResumeTransferProps> = (props) => {
20
+ const { type, pax, date, location, carName, image } = props;
21
+
22
+ const transferType =
23
+ type === 'ARV' ? 'Arrival' : type === 'DEP' ? 'Departure' : 'Inter-Hotel';
24
+
25
+ return (
26
+ <BookingResumeLayout
27
+ title={
28
+ <>
29
+ Transfer{' '}
30
+ <Text color="accent" as="span" size="lg">
31
+ {transferType}
32
+ </Text>
33
+ </>
34
+ }
35
+ icon="car-front"
36
+ image={image}>
37
+ <div className="space-y-3">
38
+ <DateDisplay dates={[date]} textColor="accent" />
39
+ <FromTo from={location.from} to={location.to} />
40
+ <div className="space-y-1">
41
+ <PaxDisplay pax={pax} />
42
+ <TextWithIcon icon="car" textSize="sm" textVariant="medium">
43
+ {carName}
44
+ </TextWithIcon>
45
+ </div>
46
+ </div>
47
+ </BookingResumeLayout>
48
+ );
49
+ };
@@ -0,0 +1,6 @@
1
+ export * from './BookingResume';
2
+ export type { BookingResumeLayoutProps } from './BookingResumeLayout/BookingResumeLayout';
3
+ export type { ResumeAccomProps } from './ResumeAccom/ResumeAccom';
4
+ export type { ResumeExcursionProps } from './ResumeExcursion/ResumeExcursion';
5
+ export type { ResumeOtherServiceProps } from './ResumeOtherService';
6
+ export type { ResumeTransferProps } from './ResumeTransfer';
@@ -1,5 +1,5 @@
1
- import React, { useState } from "react";
2
- import Icon from "../../atoms/Icon/Icon";
1
+ import React, { useState } from 'react';
2
+ import Icon, { IconName } from '../../atoms/Icon/Icon';
3
3
 
4
4
  export interface CalendarInputProps {
5
5
  /** Placeholder text */
@@ -7,7 +7,7 @@ export interface CalendarInputProps {
7
7
  /** Selected date value (formatted as string) */
8
8
  value?: string;
9
9
  /** State of the input: default, active, typing, disabled, success, error */
10
- state?: "default" | "active" | "typing" | "disabled" | "success" | "error";
10
+ state?: 'default' | 'active' | 'typing' | 'disabled' | 'success' | 'error';
11
11
  /** Helper/support text below input */
12
12
  /** Whether the input is disabled */
13
13
  disabled?: boolean;
@@ -26,36 +26,39 @@ export interface CalendarInputProps {
26
26
  /** Whether the calendar icon has full bg*/
27
27
  iconBGFull?: boolean;
28
28
  /** Position of the calendar icon: left or right */
29
- iconPosition?: "left" | "right";
29
+ iconPosition?: 'left' | 'right';
30
30
  /** Show chevron on the right when icon is on the left */
31
31
  showChevron?: boolean;
32
32
  /** Whether the calendar popover is open */
33
33
  isOpen?: boolean;
34
+ /** Icon to display on the left of the input */
35
+ icon?: IconName;
34
36
  }
35
37
 
36
38
  const CalendarInput: React.FC<CalendarInputProps> = ({
37
- placeholder = "Select date",
38
- value = "",
39
- state = "default",
39
+ placeholder = 'Select date',
40
+ value = '',
41
+ state = 'default',
40
42
  disabled = false,
41
43
  onClick,
42
44
  onCalendarClick,
43
45
  onChange,
44
46
  onFocus,
45
47
  onBlur,
46
- className = "",
48
+ className = '',
47
49
  iconBGFull = true,
48
- iconPosition = "right",
50
+ iconPosition = 'right',
49
51
  showChevron = false,
50
52
  isOpen = false,
53
+ icon = 'calendar',
51
54
  }) => {
52
55
  const [isFocused, setIsFocused] = useState(false);
53
56
  const [localValue, setLocalValue] = useState(value);
54
57
  const [isTyping, setIsTyping] = useState(false);
55
58
 
56
- const finalState = disabled ? "disabled" : state;
59
+ const finalState = disabled ? 'disabled' : state;
57
60
  const displayState =
58
- isFocused && isTyping ? "typing" : isFocused ? "active" : finalState;
61
+ isFocused && isTyping ? 'typing' : isFocused ? 'active' : finalState;
59
62
 
60
63
  const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
61
64
  const newValue = e.target.value;
@@ -89,13 +92,12 @@ const CalendarInput: React.FC<CalendarInputProps> = ({
89
92
  const iconButton = (
90
93
  <button
91
94
  type="button"
92
- className={`calendar-input__icon-button ${iconBGFull ? " calendar-input__icon-button--full-bg" : ""} calendar-input__icon-button--${iconPosition}`}
95
+ className={`calendar-input__icon-button ${iconBGFull ? ' calendar-input__icon-button--full-bg' : ''} calendar-input__icon-button--${iconPosition}`}
93
96
  onClick={handleCalendarClick}
94
97
  disabled={disabled}
95
98
  aria-label="Open calendar picker"
96
- title="Select date"
97
- >
98
- <Icon name="calendar" size="sm" className="calendar-input__icon" />
99
+ title="Select date">
100
+ <Icon name={icon} size="sm" className="calendar-input__icon" />
99
101
  </button>
100
102
  );
101
103
 
@@ -103,10 +105,9 @@ const CalendarInput: React.FC<CalendarInputProps> = ({
103
105
  <div
104
106
  className={`calendar-input calendar-input--${displayState} calendar-input--icon-${iconPosition} ${className}`.trim()}
105
107
  data-node-id="3425:11289"
106
- onClick={onClick}
107
- >
108
- {iconPosition === "left" && iconButton}
109
-
108
+ onClick={onClick}>
109
+ {iconPosition === 'left' && iconButton}
110
+
110
111
  <div className="calendar-input__input-wrapper">
111
112
  <input
112
113
  type="text"
@@ -118,16 +119,17 @@ const CalendarInput: React.FC<CalendarInputProps> = ({
118
119
  onFocus={handleFocus}
119
120
  onBlur={handleBlur}
120
121
  readOnly={true}
121
- aria-label={"Select date"}
122
+ aria-label={'Select date'}
122
123
  />
123
- {iconPosition === "left" && showChevron && (
124
- <div className={`calendar-input__chevron ${isOpen ? 'calendar-input__chevron--open' : ''}`}>
125
- <Icon name={"chevron-down"} size="sm" />
124
+ {iconPosition === 'left' && showChevron && (
125
+ <div
126
+ className={`calendar-input__chevron ${isOpen ? 'calendar-input__chevron--open' : ''}`}>
127
+ <Icon name={'chevron-down'} size="sm" />
126
128
  </div>
127
129
  )}
128
130
  </div>
129
131
 
130
- {iconPosition === "right" && iconButton}
132
+ {iconPosition === 'right' && iconButton}
131
133
  </div>
132
134
  );
133
135
  };
@@ -15,6 +15,9 @@ export interface DateDisplayProps {
15
15
 
16
16
  /** Size of the text */
17
17
  textSize?: TextProps['size'];
18
+
19
+ /** Text color */
20
+ textColor?: TextProps['color'];
18
21
  }
19
22
 
20
23
  /**
@@ -30,6 +33,7 @@ export const DateDisplay: React.FC<DateDisplayProps> = ({
30
33
  arrowSize = 'sm',
31
34
  calendarSize = 'sm',
32
35
  textSize = 'sm',
36
+ textColor = 'default',
33
37
  }) => {
34
38
  const formattedDate = useMemo(() => {
35
39
  return dates.map((d) => {
@@ -44,20 +48,20 @@ export const DateDisplay: React.FC<DateDisplayProps> = ({
44
48
  }, [dates]);
45
49
 
46
50
  return (
47
- <div className="flex items-center gap-x-3">
51
+ <Text className="flex items-center gap-x-3" as="div" color={textColor}>
48
52
  {formattedDate.map((date, index) => (
49
53
  <Fragment key={`dd-${index}`}>
50
- <span className="flex items-center gap-x-2">
54
+ <Text className="flex items-center gap-x-2" color={textColor} as="span">
51
55
  <Icon name="calendar2" size={calendarSize} />
52
- <Text variant="medium" size={textSize}>
56
+ <Text variant="medium" size={textSize} color={textColor}>
53
57
  {date}
54
58
  </Text>
55
- </span>
59
+ </Text>
56
60
  {formattedDate.length > 1 && index === 0 && (
57
61
  <Icon name="arrow-right-outline" size={arrowSize} />
58
62
  )}
59
63
  </Fragment>
60
64
  ))}
61
- </div>
65
+ </Text>
62
66
  );
63
67
  };
@@ -0,0 +1,37 @@
1
+ .cancellation-layout {
2
+ @apply py-6 relative space-y-6;
3
+ &::after {
4
+ content: '';
5
+ @apply absolute bottom-0 left-0 right-0;
6
+ height: 1px;
7
+ background-color: transparent;
8
+ background-image: repeating-linear-gradient(
9
+ to right,
10
+ var(--divider-color-default) 0,
11
+ var(--divider-color-default) 8px,
12
+ transparent 8px,
13
+ transparent 16px
14
+ );
15
+ }
16
+ .chip__label {
17
+ @apply gap-x-4;
18
+ }
19
+ }
20
+
21
+ .cancellation-layout__content {
22
+ @apply flex gap-x-4 items-start;
23
+ }
24
+
25
+ .cancellation-layout__content-left {
26
+ @apply flex-1;
27
+ }
28
+
29
+ .cancellation-layout__content-right {
30
+ @apply overflow-hidden;
31
+ max-width: 150px;
32
+ border-radius: var(--border-radius-rounded-2xl);
33
+ img {
34
+ object-fit: cover;
35
+ height: 200px;
36
+ }
37
+ }
@@ -0,0 +1,28 @@
1
+ import { IconName } from '@/src/components/atoms/Icon/Icon';
2
+ import { cn } from '@/src/lib/utils';
3
+ import React from 'react';
4
+ import { ServiceTitle } from '../../ServiceTitle/ServiceTitle';
5
+ import './CancellationLayout.css';
6
+
7
+ export interface CancellationLayoutProps {
8
+ title: React.ReactNode;
9
+ icon: IconName;
10
+ children?: React.ReactNode;
11
+ className?: string;
12
+ image: string;
13
+ }
14
+
15
+ export const CancellationLayout: React.FC<CancellationLayoutProps> = (props) => {
16
+ const { title, icon, children, className, image } = props;
17
+ return (
18
+ <div className={cn('cancellation-layout', className)}>
19
+ <ServiceTitle title={title} icon={icon} />
20
+ <div className="cancellation-layout__content">
21
+ <div className="cancellation-layout__content-left">{children}</div>
22
+ <figure className="cancellation-layout__content-right">
23
+ <img src={image} alt={title?.toString() || ''} width={150} height={200} />
24
+ </figure>
25
+ </div>
26
+ </div>
27
+ );
28
+ };
@@ -0,0 +1,65 @@
1
+ import useStays from '@/src/hooks/useStays';
2
+ import { RoomItem } from '@/src/types/table';
3
+ import { Fragment } from 'react';
4
+ import Chip from '../../atoms/Chip/Chip';
5
+ import { Text } from '../../atoms/Typography/Typography';
6
+ import { DateDisplay } from '../DateDisplay/DateDisplay';
7
+ import TextWithIcon from '../TextWithIcon/TextWithIcon';
8
+ import { CancellationLayout } from './CancellationLayout/CancellationLayout';
9
+
10
+ export interface DialogCancellationAccomProps {
11
+ image: string;
12
+ hotelName: string;
13
+ dates: string[];
14
+ rooms: RoomItem[];
15
+ }
16
+
17
+ export const DialogCancellationAccom: React.FC<DialogCancellationAccomProps> = (
18
+ props
19
+ ) => {
20
+ const { image, hotelName, dates, rooms } = props;
21
+ const stay = useStays(dates);
22
+
23
+ return (
24
+ <CancellationLayout title="Accommodation" icon="accom" image={image}>
25
+ <div className="space-y-6">
26
+ <div className="space-y-1">
27
+ <Text variant="bold">{hotelName}</Text>
28
+ <DateDisplay dates={dates} />
29
+ <TextWithIcon icon="night" textLeading="4">
30
+ {stay} Nights
31
+ </TextWithIcon>
32
+ </div>
33
+ <div className="">
34
+ {rooms.map((room, index) => (
35
+ <div key={`rm-${index}`} className="space-y-4">
36
+ <div className="space-y-1">
37
+ <TextWithIcon icon="accom" textLeading="4">
38
+ {index + 1} Room
39
+ </TextWithIcon>
40
+ <Text size="sm">{room.RoomName}</Text>
41
+ </div>
42
+ {room.cancellation_policy.map((policy) => (
43
+ <Fragment key={`policy-${index}`}>
44
+ <Chip type="outline" color="brand" isBlackText>
45
+ Policy period applies{' '}
46
+ <DateDisplay
47
+ dates={[policy.ValidFrom, policy.ValidTo]}
48
+ textSize="xs"
49
+ />
50
+ </Chip>
51
+ <Text variant="bold" size="xs" leading="4">
52
+ {policy.Value} % of total price
53
+ </Text>
54
+ <Text size="xs" leading="4">
55
+ {policy.Description}
56
+ </Text>
57
+ </Fragment>
58
+ ))}
59
+ </div>
60
+ ))}
61
+ </div>
62
+ </div>
63
+ </CancellationLayout>
64
+ );
65
+ };
@@ -0,0 +1,59 @@
1
+ import { Text } from '../../atoms/Typography/Typography';
2
+ import { DateDisplay } from '../DateDisplay/DateDisplay';
3
+ import { ServiceInfo } from '../ServiceInfo/ServiceInfo';
4
+ import { CancellationLayout } from './CancellationLayout/CancellationLayout';
5
+
6
+ export interface DialogCancellationExcursionProps {
7
+ image: string;
8
+ excursionName: string;
9
+ date: string;
10
+ policy: {
11
+ title: string;
12
+ description: string;
13
+ };
14
+ details: {
15
+ duration: string;
16
+ meal: string;
17
+ accessibility: string;
18
+ transferType: string;
19
+ };
20
+ }
21
+
22
+ export const DialogCancellationExcursion: React.FC<DialogCancellationExcursionProps> = (
23
+ props
24
+ ) => {
25
+ const { image, excursionName, date, details, policy } = props;
26
+
27
+ return (
28
+ <CancellationLayout title="Excursion" icon="map" image={image}>
29
+ <div className="space-y-6">
30
+ <div className="space-y-1">
31
+ <Text variant="bold">{excursionName}</Text>
32
+ <DateDisplay dates={[date]} />
33
+ </div>
34
+ <ServiceInfo>
35
+ <ServiceInfo.Item icon="stopwatch" label="Duration">
36
+ {details.duration}
37
+ </ServiceInfo.Item>
38
+ <ServiceInfo.Item icon="utensils" label="Meal">
39
+ {details.meal}
40
+ </ServiceInfo.Item>
41
+ <ServiceInfo.Item icon="bike" label="Difficulty">
42
+ {details.accessibility}
43
+ </ServiceInfo.Item>
44
+ <ServiceInfo.Item icon="car" label="Transfer Type">
45
+ {details.transferType}
46
+ </ServiceInfo.Item>
47
+ </ServiceInfo>
48
+ <div className="">
49
+ <Text variant="bold" size="xs" leading="4">
50
+ {policy.title}
51
+ </Text>
52
+ <Text size="xs" leading="4">
53
+ {policy.description}
54
+ </Text>
55
+ </div>
56
+ </div>
57
+ </CancellationLayout>
58
+ );
59
+ };
@@ -0,0 +1,49 @@
1
+ import React from 'react';
2
+ import {
3
+ DialogCancellationAccom,
4
+ DialogCancellationAccomProps,
5
+ } from './DialogCancellationAccom';
6
+ import {
7
+ DialogCancellationExcursion,
8
+ DialogCancellationExcursionProps,
9
+ } from './DialogCancellationExcursion';
10
+ import { DialogContentPolicy } from './DialogContentPolicy';
11
+
12
+ export interface CancellationItem {
13
+ type: 'accommodation' | 'excursion';
14
+ data: DialogCancellationAccomProps | DialogCancellationExcursionProps;
15
+ }
16
+
17
+ export interface DialogCancellationListProps {
18
+ cancellations: CancellationItem[];
19
+ }
20
+
21
+ export const DialogCancellationList: React.FC<DialogCancellationListProps> = (props) => {
22
+ const { cancellations } = props;
23
+
24
+ const isAccommodation = (
25
+ data: CancellationItem['data']
26
+ ): data is DialogCancellationAccomProps => {
27
+ return 'hotelName' in data;
28
+ };
29
+
30
+ const isExcursion = (
31
+ data: CancellationItem['data']
32
+ ): data is DialogCancellationExcursionProps => {
33
+ return 'excursionName' in data;
34
+ };
35
+
36
+ return (
37
+ <DialogContentPolicy>
38
+ {cancellations.map((c, index) => {
39
+ if (c.type === 'accommodation' && isAccommodation(c.data)) {
40
+ return <DialogCancellationAccom key={`acc-${index}`} {...c.data} />;
41
+ }
42
+ if (c.type === 'excursion' && isExcursion(c.data)) {
43
+ return <DialogCancellationExcursion key={`exc-${index}`} {...c.data} />;
44
+ }
45
+ return null;
46
+ })}
47
+ </DialogContentPolicy>
48
+ );
49
+ };
@@ -0,0 +1,45 @@
1
+ import { CheckedState } from '@radix-ui/react-checkbox';
2
+ import React, { useState } from 'react';
3
+ import Button from '../../atoms/Button/Button';
4
+ import { Text } from '../../atoms/Typography/Typography';
5
+ import { Checkbox } from '../../ui/checkbox';
6
+ import { DialogCancellationAccom } from './DialogCancellationAccom';
7
+ import { DialogCancellationExcursion } from './DialogCancellationExcursion';
8
+ import { DialogCancellationList } from './DialogCancellationList';
9
+
10
+ export interface DialogContentPolicyProps {
11
+ children: React.ReactNode;
12
+ onSubmit?: () => void;
13
+ }
14
+
15
+ export const DialogContentPolicy = (props: DialogContentPolicyProps) => {
16
+ const { children, onSubmit } = props;
17
+ const [accepted, setAccepted] = useState<CheckedState>(false);
18
+
19
+ return (
20
+ <div className="cancellation-policy">
21
+ {children}
22
+ <div className="flex justify-end gap-x-8 py-9">
23
+ <div className="flex gap-x-2.5 items-center">
24
+ <label htmlFor="accept-terms">
25
+ <Text size="sm" as="span">
26
+ I've read and accept the cancellation policy.
27
+ </Text>
28
+ </label>
29
+ <Checkbox id="accept-terms" checked={accepted} onCheckedChange={setAccepted} />
30
+ </div>
31
+ <Button
32
+ className="w-[250px]"
33
+ variant="secondary"
34
+ disabled={!accepted}
35
+ onClick={onSubmit}>
36
+ Next
37
+ </Button>
38
+ </div>
39
+ </div>
40
+ );
41
+ };
42
+
43
+ DialogContentPolicy.Accommodation = DialogCancellationAccom;
44
+ DialogContentPolicy.Excursion = DialogCancellationExcursion;
45
+ DialogContentPolicy.List = DialogCancellationList;