mautourco-components 0.2.30 → 0.2.32

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 (328) hide show
  1. package/README.md +54 -24
  2. package/dist/components/atoms/Avatar/Avatar.js +1 -12
  3. package/dist/components/atoms/Button/Button.js +1 -12
  4. package/dist/components/atoms/Checkbox/Checkbox.js +2 -13
  5. package/dist/components/atoms/Chip/Chip.js +1 -12
  6. package/dist/components/atoms/Icon/icons/AccomIcon.js +1 -12
  7. package/dist/components/atoms/Icon/icons/AirIcon.js +1 -12
  8. package/dist/components/atoms/Icon/icons/ArrivalIcon.js +1 -12
  9. package/dist/components/atoms/Icon/icons/ArrowDownOutlineIcon.js +1 -12
  10. package/dist/components/atoms/Icon/icons/ArrowRightOutlineIcon.js +1 -12
  11. package/dist/components/atoms/Icon/icons/BadgeAlertIcon.js +1 -12
  12. package/dist/components/atoms/Icon/icons/BikeIcon.js +1 -12
  13. package/dist/components/atoms/Icon/icons/BookingIcon.js +1 -12
  14. package/dist/components/atoms/Icon/icons/Building2OutlineIcon.js +1 -12
  15. package/dist/components/atoms/Icon/icons/BuildingIcon.js +1 -12
  16. package/dist/components/atoms/Icon/icons/BusIcon.js +1 -12
  17. package/dist/components/atoms/Icon/icons/Calendar2Icon.js +1 -12
  18. package/dist/components/atoms/Icon/icons/CalendarIcon.js +1 -12
  19. package/dist/components/atoms/Icon/icons/CalendarOutlineIcon.js +1 -12
  20. package/dist/components/atoms/Icon/icons/CalendarRangeOutlineIcon.js +1 -12
  21. package/dist/components/atoms/Icon/icons/CarFront.js +1 -12
  22. package/dist/components/atoms/Icon/icons/CarIcon.js +1 -12
  23. package/dist/components/atoms/Icon/icons/CatamaranIcon.js +1 -12
  24. package/dist/components/atoms/Icon/icons/Check.js +1 -12
  25. package/dist/components/atoms/Icon/icons/CheckCircleIcon.js +1 -12
  26. package/dist/components/atoms/Icon/icons/Chevron.js +1 -1
  27. package/dist/components/atoms/Icon/icons/ClockIcon.js +1 -12
  28. package/dist/components/atoms/Icon/icons/Close.js +1 -12
  29. package/dist/components/atoms/Icon/icons/CloseCircleIcon.js +1 -12
  30. package/dist/components/atoms/Icon/icons/DeleteIcon.js +1 -12
  31. package/dist/components/atoms/Icon/icons/DepartureIcon.js +1 -12
  32. package/dist/components/atoms/Icon/icons/EyeIcon.js +1 -12
  33. package/dist/components/atoms/Icon/icons/FacebookIcon.js +1 -12
  34. package/dist/components/atoms/Icon/icons/HomeIcon.js +1 -12
  35. package/dist/components/atoms/Icon/icons/Info2Icon.d.ts +4 -0
  36. package/dist/components/atoms/Icon/icons/Info2Icon.js +25 -0
  37. package/dist/components/atoms/Icon/icons/InfoIcon.js +1 -12
  38. package/dist/components/atoms/Icon/icons/Land.js +1 -12
  39. package/dist/components/atoms/Icon/icons/LineIcon.js +1 -12
  40. package/dist/components/atoms/Icon/icons/LinkedInIcon.js +1 -12
  41. package/dist/components/atoms/Icon/icons/LuggageIcon.js +1 -12
  42. package/dist/components/atoms/Icon/icons/MapIcon.js +1 -12
  43. package/dist/components/atoms/Icon/icons/MapPinIcon.js +1 -12
  44. package/dist/components/atoms/Icon/icons/MautoucoLogo.d.ts +0 -1
  45. package/dist/components/atoms/Icon/icons/MautoucoLogo.js +1 -12
  46. package/dist/components/atoms/Icon/icons/MenuIcon.d.ts +0 -1
  47. package/dist/components/atoms/Icon/icons/MenuIcon.js +1 -12
  48. package/dist/components/atoms/Icon/icons/MicroIcon.js +1 -12
  49. package/dist/components/atoms/Icon/icons/MinusIcon.js +1 -12
  50. package/dist/components/atoms/Icon/icons/MoreIcon.js +1 -12
  51. package/dist/components/atoms/Icon/icons/MoreVerticalIcon.js +1 -12
  52. package/dist/components/atoms/Icon/icons/NightIcon.js +1 -12
  53. package/dist/components/atoms/Icon/icons/PlaneIcon.js +1 -12
  54. package/dist/components/atoms/Icon/icons/PlaneLandingOutlineIcon.js +1 -12
  55. package/dist/components/atoms/Icon/icons/PlaneTakeoffOutlineIcon.js +1 -12
  56. package/dist/components/atoms/Icon/icons/PlusCircleIcon.js +1 -12
  57. package/dist/components/atoms/Icon/icons/PlusIcon.js +1 -12
  58. package/dist/components/atoms/Icon/icons/QuotationIcon.js +1 -12
  59. package/dist/components/atoms/Icon/icons/SeaIcon.js +1 -12
  60. package/dist/components/atoms/Icon/icons/Search.js +1 -12
  61. package/dist/components/atoms/Icon/icons/Settings.js +1 -12
  62. package/dist/components/atoms/Icon/icons/ShipIcon.js +1 -12
  63. package/dist/components/atoms/Icon/icons/StopWatchIcon.js +1 -12
  64. package/dist/components/atoms/Icon/icons/StrollerIcon.js +1 -12
  65. package/dist/components/atoms/Icon/icons/TwitterIcon.js +1 -12
  66. package/dist/components/atoms/Icon/icons/User.js +1 -12
  67. package/dist/components/atoms/Icon/icons/UserIcon.js +1 -12
  68. package/dist/components/atoms/Icon/icons/Utensils.js +1 -12
  69. package/dist/components/atoms/Icon/icons/WalletIcon.js +1 -12
  70. package/dist/components/atoms/Icon/icons/Youtube.js +1 -12
  71. package/dist/components/atoms/Icon/icons/registry.d.ts +1 -0
  72. package/dist/components/atoms/Icon/icons/registry.js +2 -0
  73. package/dist/components/atoms/Illustration/illustrations.js +4 -4
  74. package/dist/components/atoms/Inputs/DropdownInput/DropdownInput.js +1 -12
  75. package/dist/components/atoms/Inputs/Input/Input.d.ts +2 -1
  76. package/dist/components/atoms/Inputs/Input/Input.js +2 -13
  77. package/dist/components/atoms/Link/Link.js +4 -15
  78. package/dist/components/atoms/RatingStar/RatingStar.js +2 -13
  79. package/dist/components/atoms/SegmentedButton/SegmentedButton.js +3 -14
  80. package/dist/components/atoms/SelectedValue/SelectedValue.js +1 -12
  81. package/dist/components/atoms/Slider/Slider.js +1 -12
  82. package/dist/components/atoms/Spinner/Spinner.js +1 -12
  83. package/dist/components/atoms/Tab/Tab.js +1 -1
  84. package/dist/components/atoms/Typography/Typography.js +2 -13
  85. package/dist/components/molecules/AccomodationDocket/AccomodationDocket.js +3 -14
  86. package/dist/components/molecules/ActionDropdown/ActionDropdown.d.ts +0 -1
  87. package/dist/components/molecules/ActionDropdown/ActionDropdown.js +5 -16
  88. package/dist/components/molecules/AddItemButton/AddItemButton.js +1 -12
  89. package/dist/components/molecules/BookingPax/BookingPaxAccom.js +3 -14
  90. package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.d.ts +0 -1
  91. package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.js +5 -5
  92. package/dist/components/molecules/BookingPax/BookingPaxExcursion.js +1 -12
  93. package/dist/components/molecules/BookingPax/BookingPaxHeader.js +2 -2
  94. package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.d.ts +0 -1
  95. package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.js +1 -12
  96. package/dist/components/molecules/BookingPax/BookingPaxRemarks.js +1 -12
  97. package/dist/components/molecules/BookingPax/BookingPaxTransfer.js +1 -12
  98. package/dist/components/molecules/BookingResume/BookingResumeLayout/BookingResumeLayout.js +1 -12
  99. package/dist/components/molecules/BookingResume/ResumeAccom/ResumeAccom.js +1 -12
  100. package/dist/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.js +1 -12
  101. package/dist/components/molecules/BookingResume/ResumeOtherService.js +1 -12
  102. package/dist/components/molecules/BookingResume/ResumeTransfer.js +1 -12
  103. package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js +1 -12
  104. package/dist/components/molecules/Calendar/CalendarInput.js +2 -13
  105. package/dist/components/molecules/Calendar/DateTime.d.ts +9 -9
  106. package/dist/components/molecules/Calendar/DateTime.js +3 -3
  107. package/dist/components/molecules/Calendar/TimePicker.js +1 -12
  108. package/dist/components/molecules/DateDisplay/DateDisplay.js +2 -13
  109. package/dist/components/molecules/DetailsInfo/DetailsAction.js +2 -13
  110. package/dist/components/molecules/DetailsInfo/DetailsAgency/DetailsAgency.js +1 -12
  111. package/dist/components/molecules/DetailsInfo/DetailsClient/DetailsClient.js +1 -12
  112. package/dist/components/molecules/DetailsInfo/DetailsFile.js +1 -12
  113. package/dist/components/molecules/DetailsInfo/DetailsInfo.d.ts +0 -1
  114. package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.js +1 -12
  115. package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.d.ts +0 -1
  116. package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.js +1 -12
  117. package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.d.ts +0 -1
  118. package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.js +1 -12
  119. package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.d.ts +3 -3
  120. package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.js +2 -2
  121. package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.js +1 -12
  122. package/dist/components/molecules/DocketPrices/DocketPrices.js +1 -12
  123. package/dist/components/molecules/ExcursionDocket/ExcursionDocket.js +1 -12
  124. package/dist/components/molecules/FeatureRow/FeatureRow.js +1 -12
  125. package/dist/components/molecules/FromTo/FromTo.d.ts +0 -1
  126. package/dist/components/molecules/FromTo/FromTo.js +1 -12
  127. package/dist/components/molecules/GlobalAmenities/GlobalAmenities.js +1 -12
  128. package/dist/components/molecules/LocationDropdown/LocationDropdown.js +6 -17
  129. package/dist/components/molecules/MultiSelectDropdown/MultiSelectDropdown.d.ts +1 -0
  130. package/dist/components/molecules/MultiSelectDropdown/MultiSelectDropdown.js +23 -28
  131. package/dist/components/molecules/OtherServiceDocket/OtherServiceDocket.js +1 -12
  132. package/dist/components/molecules/Pagination/Pagination.js +4 -15
  133. package/dist/components/molecules/PaxChips/PaxChips.d.ts +11 -0
  134. package/dist/components/molecules/PaxChips/PaxChips.js +9 -0
  135. package/dist/components/molecules/PaxDisplay/PaxDisplay.d.ts +0 -1
  136. package/dist/components/molecules/PaxDisplay/PaxDisplay.js +5 -16
  137. package/dist/components/molecules/PriceDisplay/PriceDisplay.js +1 -12
  138. package/dist/components/molecules/RatingTab/RatingTab.js +1 -12
  139. package/dist/components/molecules/SectionTitle/SectionTitle.js +1 -12
  140. package/dist/components/molecules/ServiceInfo/ServiceInfo.js +2 -13
  141. package/dist/components/molecules/ServiceLanguages/ServiceLanguages.js +1 -12
  142. package/dist/components/molecules/ServiceSelector/ServiceSelector.js +4 -15
  143. package/dist/components/molecules/ServiceTitle/ServiceTitle.js +1 -12
  144. package/dist/components/molecules/Stepper/Stepper.js +1 -12
  145. package/dist/components/molecules/StepperTimeline/StepperTimeline.js +6 -17
  146. package/dist/components/molecules/TabGroup/TabGroup.js +1 -12
  147. package/dist/components/molecules/TableServiceItem/DetailsCol.js +1 -12
  148. package/dist/components/molecules/TableServiceItem/ItemCol.d.ts +0 -1
  149. package/dist/components/molecules/TableServiceItem/ItemCol.js +2 -13
  150. package/dist/components/molecules/TableServiceItem/RowOtherServices.js +1 -12
  151. package/dist/components/molecules/TableServiceItem/RowTransfer.js +1 -12
  152. package/dist/components/molecules/TableServiceItem/index.d.ts +0 -1
  153. package/dist/components/molecules/TextWithBorderBottom/TextWithBorderBottom.js +1 -1
  154. package/dist/components/molecules/TextWithIcon/TextWithIcon.d.ts +0 -1
  155. package/dist/components/molecules/TextWithIcon/TextWithIcon.js +1 -12
  156. package/dist/components/molecules/TimelineItem/ServiceAccommodation.js +1 -12
  157. package/dist/components/molecules/TimelineItem/ServiceExcursion.js +1 -12
  158. package/dist/components/molecules/TimelineItem/ServiceTransfer.js +1 -12
  159. package/dist/components/molecules/TimelineItem/TimelineHeader.js +1 -12
  160. package/dist/components/molecules/TimelineItem/TimelineItem.d.ts +0 -1
  161. package/dist/components/molecules/TimelineItem/TimelineItem.js +1 -12
  162. package/dist/components/molecules/Toast/Toast.css +2107 -0
  163. package/dist/components/molecules/Toast/Toast.d.ts +2 -2
  164. package/dist/components/molecules/Toast/Toast.js +1 -12
  165. package/dist/components/molecules/TooltipDisplay/TooltipDisplay.js +1 -12
  166. package/dist/components/molecules/TransferDocket/TransferDocket.js +2 -13
  167. package/dist/components/molecules/UserCard/UserCard.js +3 -14
  168. package/dist/components/organisms/Booking/BookingDocket/BookingDocket.d.ts +0 -1
  169. package/dist/components/organisms/Booking/BookingDocket/BookingDocket.js +1 -1
  170. package/dist/components/organisms/Booking/BookingHeader.js +1 -12
  171. package/dist/components/organisms/Booking/BookingStep/BookingStep.js +1 -12
  172. package/dist/components/organisms/CarBookingCard/CarBookingCard.js +2 -2
  173. package/dist/components/organisms/CarBookingCard/CarBookingCardSkeleton.js +1 -12
  174. package/dist/components/organisms/CardContainer/CardContainer.js +1 -12
  175. package/dist/components/organisms/DateTimePicker/DateTimePicker.js +1 -12
  176. package/dist/components/organisms/Dialog/Dialog.js +3 -15
  177. package/dist/components/organisms/DialogBookingAddItem/AddItemNewService.d.ts +16 -0
  178. package/dist/components/organisms/DialogBookingAddItem/AddItemNewService.js +44 -0
  179. package/dist/components/organisms/DialogBookingAddItem/AddItemSelector.d.ts +8 -0
  180. package/dist/components/organisms/DialogBookingAddItem/AddItemSelector.js +12 -0
  181. package/dist/components/organisms/DialogBookingAddItem/DialogBookingAddItem.d.ts +17 -0
  182. package/dist/components/organisms/DialogBookingAddItem/DialogBookingAddItem.js +55 -0
  183. package/dist/components/organisms/DialogBookingAddItem/index.d.ts +3 -0
  184. package/dist/components/organisms/DialogBookingAddItem/index.js +3 -0
  185. package/dist/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.d.ts +2 -2
  186. package/dist/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.js +1 -12
  187. package/dist/components/organisms/DialogBookingConfirm/BookingMailSent.js +1 -12
  188. package/dist/components/organisms/DialogBookingConfirm/BookingReference.js +1 -12
  189. package/dist/components/organisms/DialogBookingConfirm/BookingSuccess.js +1 -12
  190. package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.d.ts +4 -0
  191. package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.js +2 -13
  192. package/dist/components/organisms/DialogCancelService/CancelBooking/CancelBooking.css +2117 -0
  193. package/dist/components/organisms/DialogCancelService/CancelBooking/CancelBooking.d.ts +16 -0
  194. package/dist/components/organisms/DialogCancelService/CancelBooking/CancelBooking.js +28 -0
  195. package/dist/components/organisms/{CancelService → DialogCancelService}/CancelPolicy.d.ts +2 -2
  196. package/dist/components/organisms/DialogCancelService/CancelPolicy.js +8 -0
  197. package/dist/components/organisms/DialogCancelService/ConfirmDelete/ConfirmDelete.js +24 -0
  198. package/dist/components/organisms/{CancelService/CancelService.d.ts → DialogCancelService/DialogCancelService.d.ts} +4 -3
  199. package/dist/components/organisms/DialogCancelService/DialogCancelService.js +14 -0
  200. package/dist/components/organisms/DialogCancelService/FromList.js +18 -0
  201. package/dist/components/organisms/DialogCancelService/index.d.ts +5 -0
  202. package/dist/components/organisms/DialogCancelService/index.js +1 -0
  203. package/dist/components/organisms/DialogComparison/DialogComparison.css +2116 -0
  204. package/dist/components/organisms/DialogComparison/DialogComparison.d.ts +24 -0
  205. package/dist/components/organisms/DialogComparison/DialogComparison.js +69 -0
  206. package/dist/components/organisms/DialogDeleteConfirm/DialogDeleteConfirm.d.ts +14 -0
  207. package/dist/components/organisms/DialogDeleteConfirm/DialogDeleteConfirm.js +11 -0
  208. package/dist/components/organisms/DialogSendingMail/DialogSendingMail.d.ts +11 -0
  209. package/dist/components/organisms/DialogSendingMail/DialogSendingMail.js +8 -0
  210. package/dist/components/organisms/DialogSendingMail/DialogSendingMailContent.d.ts +15 -0
  211. package/dist/components/organisms/DialogSendingMail/DialogSendingMailContent.js +49 -0
  212. package/dist/components/organisms/DialogSendingMail/index.d.ts +4 -0
  213. package/dist/components/organisms/DialogSendingMail/index.js +2 -0
  214. package/dist/components/organisms/DialogSendingMail/sending-mail-schema.d.ts +7 -0
  215. package/dist/components/organisms/DialogSendingMail/sending-mail-schema.js +16 -0
  216. package/dist/components/organisms/Docket/Docket.js +8 -19
  217. package/dist/components/organisms/Footer/Footer.js +3 -14
  218. package/dist/components/organisms/MultipleQuotationDocket/MultipleQuotationDocket.js +2 -13
  219. package/dist/components/organisms/PaxSelector/PaxSelector.js +22 -22
  220. package/dist/components/organisms/QuoteHeader/QuoteHeader.js +2 -13
  221. package/dist/components/organisms/RoundTrip/RoundTrip.js +1 -1
  222. package/dist/components/organisms/SearchBarTransfer/SearchBarTransfer.js +5 -5
  223. package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.js +1 -12
  224. package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.js +1 -12
  225. package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.d.ts +0 -1
  226. package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.js +1 -12
  227. package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.js +1 -12
  228. package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.js +1 -12
  229. package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.js +1 -12
  230. package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.js +1 -12
  231. package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.js +1 -12
  232. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.d.ts +0 -1
  233. package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.js +1 -12
  234. package/dist/components/organisms/TabServiceDetails/Accommodation.js +1 -1
  235. package/dist/components/organisms/TabServiceDetails/DetailContentTransfer.js +1 -12
  236. package/dist/components/organisms/TabServiceDetails/DetailsContentAccom.js +2 -2
  237. package/dist/components/organisms/TabServiceDetails/DetailsContentExcursion.js +1 -12
  238. package/dist/components/organisms/TabServiceDetails/Excursion.js +1 -1
  239. package/dist/components/organisms/TabServiceDetails/TabServiceDetails.d.ts +0 -1
  240. package/dist/components/organisms/TabServiceDetails/TabServiceDetailsLayout/TabServiceDetailsLayout.js +1 -12
  241. package/dist/components/organisms/TabServiceDetails/Transfer.js +1 -1
  242. package/dist/components/organisms/Table/Table.css +48 -32
  243. package/dist/components/organisms/Table/Table.d.ts +4 -1
  244. package/dist/components/organisms/Table/Table.js +19 -16
  245. package/dist/components/organisms/Table/TableCell.d.ts +1 -1
  246. package/dist/components/organisms/Table/TableCell.js +1 -12
  247. package/dist/components/organisms/Table/columns/booking-cancel-service-columns.js +15 -31
  248. package/dist/components/organisms/Table/columns/booking-columns.js +7 -22
  249. package/dist/components/organisms/Table/columns/comparison-columns.d.ts +3 -0
  250. package/dist/components/organisms/Table/columns/comparison-columns.js +97 -0
  251. package/dist/components/organisms/Table/columns/detail-resume-columns.js +16 -31
  252. package/dist/components/organisms/Table/columns/index.d.ts +11 -7
  253. package/dist/components/organisms/Table/columns/index.js +2 -0
  254. package/dist/components/organisms/Table/columns/quotation-columns.d.ts +4 -1
  255. package/dist/components/organisms/Table/columns/quotation-columns.js +10 -19
  256. package/dist/components/organisms/Timeline/Timeline.js +1 -1
  257. package/dist/components/organisms/TopNavigation/DesktopNav.d.ts +0 -1
  258. package/dist/components/organisms/TopNavigation/DesktopNav.js +5 -16
  259. package/dist/components/organisms/TopNavigation/MobileNav.js +9 -20
  260. package/dist/components/organisms/TransferLine/TransferLine.js +1 -1
  261. package/dist/components/ui/button.d.ts +1 -1
  262. package/dist/components/ui/calendar.js +2 -2
  263. package/dist/components/ui/form.d.ts +24 -0
  264. package/dist/components/ui/form.js +79 -0
  265. package/dist/components/ui/label.d.ts +4 -0
  266. package/dist/components/ui/label.js +30 -0
  267. package/dist/hooks/useBookingPax.d.ts +1 -1
  268. package/dist/index.d.ts +26 -15
  269. package/dist/index.js +10 -2
  270. package/dist/lib/price-formatter.d.ts +1 -0
  271. package/dist/lib/price-formatter.js +13 -0
  272. package/dist/lib/shared-constant.d.ts +1 -0
  273. package/dist/lib/shared-constant.js +1 -0
  274. package/dist/lib/utils.d.ts +1 -2
  275. package/dist/lib/utils.js +1 -1
  276. package/dist/styles/mautourco.css +40 -0
  277. package/dist/styles/tokens/tokens.d.ts +464 -464
  278. package/package.json +7 -3
  279. package/src/components/atoms/Icon/icons/Info2Icon.tsx +42 -0
  280. package/src/components/atoms/Icon/icons/registry.tsx +2 -0
  281. package/src/components/atoms/Inputs/Input/Input.tsx +4 -2
  282. package/src/components/molecules/Calendar/DateTime.tsx +6 -4
  283. package/src/components/molecules/DialogContentPolicy/DialogCancellationList.tsx +6 -6
  284. package/src/components/molecules/DialogContentPolicy/DialogContentPolicy.tsx +1 -1
  285. package/src/components/molecules/MultiSelectDropdown/MultiSelectDropdown.tsx +117 -82
  286. package/src/components/molecules/PaxChips/PaxChips.tsx +30 -0
  287. package/src/components/molecules/TextWithIcon/TextWithIcon.tsx +2 -2
  288. package/src/components/molecules/Toast/Toast.css +27 -0
  289. package/src/components/molecules/Toast/Toast.tsx +9 -9
  290. package/src/components/organisms/Dialog/Dialog.tsx +85 -64
  291. package/src/components/organisms/{BookingAddItem → DialogBookingAddItem}/AddItemNewService.tsx +17 -2
  292. package/src/components/organisms/{BookingAddItem/BookingAddItem.tsx → DialogBookingAddItem/DialogBookingAddItem.tsx} +6 -6
  293. package/src/components/organisms/{BookingAddItem → DialogBookingAddItem}/index.ts +1 -1
  294. package/src/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.tsx +2 -2
  295. package/src/components/organisms/DialogBookingConfirm/DialogBookingConfirm.tsx +14 -2
  296. package/src/components/organisms/DialogCancelService/CancelBooking/CancelBooking.css +24 -0
  297. package/src/components/organisms/DialogCancelService/CancelBooking/CancelBooking.tsx +98 -0
  298. package/src/components/organisms/{CancelService → DialogCancelService}/CancelPolicy.tsx +4 -4
  299. package/src/components/organisms/{CancelService/CancelService.tsx → DialogCancelService/DialogCancelService.tsx} +7 -5
  300. package/src/components/organisms/DialogCancelService/index.ts +6 -0
  301. package/src/components/organisms/DialogComparison/DialogComparison.css +23 -0
  302. package/src/components/organisms/DialogComparison/DialogComparison.tsx +157 -0
  303. package/src/components/organisms/DialogDeleteConfirm/DialogDeleteConfirm.tsx +57 -0
  304. package/src/components/organisms/DialogSendingMail/DialogSendingMail.tsx +27 -0
  305. package/src/components/organisms/DialogSendingMail/DialogSendingMailContent.tsx +115 -0
  306. package/src/components/organisms/DialogSendingMail/index.ts +5 -0
  307. package/src/components/organisms/DialogSendingMail/sending-mail-schema.ts +19 -0
  308. package/src/components/organisms/Table/Table.css +48 -32
  309. package/src/components/organisms/Table/Table.tsx +24 -5
  310. package/src/components/organisms/Table/columns/booking-cancel-service-columns.tsx +16 -32
  311. package/src/components/organisms/Table/columns/booking-columns.tsx +2 -19
  312. package/src/components/organisms/Table/columns/comparison-columns.tsx +140 -0
  313. package/src/components/organisms/Table/columns/detail-resume-columns.tsx +17 -33
  314. package/src/components/organisms/Table/columns/index.ts +2 -0
  315. package/src/components/organisms/Table/columns/quotation-columns.tsx +17 -9
  316. package/src/components/ui/form.tsx +160 -0
  317. package/src/components/ui/label.tsx +22 -0
  318. package/dist/components/organisms/CancelService/CancelPolicy.js +0 -19
  319. package/dist/components/organisms/CancelService/CancelService.js +0 -23
  320. package/dist/components/organisms/CancelService/ConfirmDelete/ConfirmDelete.js +0 -35
  321. package/dist/components/organisms/CancelService/FromList.js +0 -29
  322. /package/dist/components/organisms/{CancelService → DialogCancelService}/ConfirmDelete/ConfirmDelete.css +0 -0
  323. /package/dist/components/organisms/{CancelService → DialogCancelService}/ConfirmDelete/ConfirmDelete.d.ts +0 -0
  324. /package/dist/components/organisms/{CancelService → DialogCancelService}/FromList.d.ts +0 -0
  325. /package/src/components/organisms/{BookingAddItem → DialogBookingAddItem}/AddItemSelector.tsx +0 -0
  326. /package/src/components/organisms/{CancelService → DialogCancelService}/ConfirmDelete/ConfirmDelete.css +0 -0
  327. /package/src/components/organisms/{CancelService → DialogCancelService}/ConfirmDelete/ConfirmDelete.tsx +0 -0
  328. /package/src/components/organisms/{CancelService → DialogCancelService}/FromList.tsx +0 -0
@@ -0,0 +1,157 @@
1
+ import {
2
+ DetailResumeAccommodation,
3
+ DetailResumeExcursion,
4
+ DetailResumeOtherService,
5
+ DetailResumeTransfer,
6
+ ServiceType,
7
+ } from '@/src/types/table';
8
+ import { useEffect, useState } from 'react';
9
+ import Button from '../../atoms/Button/Button';
10
+ import Chip from '../../atoms/Chip/Chip';
11
+ import MultiSelectDropdown from '../../molecules/MultiSelectDropdown/MultiSelectDropdown';
12
+ import { DialogBookingConfirm } from '../DialogBookingConfirm';
13
+ import { Table } from '../Table';
14
+ import { columns as defaultColumns } from '../Table/columns';
15
+ import { ColumnType } from '../Table/TableCell';
16
+ import './DialogComparison.css';
17
+
18
+ export type ComparisonData =
19
+ | DetailResumeAccommodation
20
+ | DetailResumeTransfer
21
+ | DetailResumeExcursion
22
+ | DetailResumeOtherService;
23
+
24
+ export interface MultiComparisonData {
25
+ id: string;
26
+ name: string;
27
+ data: ComparisonData[];
28
+ }
29
+
30
+ export interface DialogComparisonProps {
31
+ open: boolean;
32
+ setOpen: (open: boolean) => void;
33
+ data: MultiComparisonData[];
34
+ columns?: ColumnType<ComparisonData>[];
35
+ onBookNow: (payload: {
36
+ selectedValues: string[];
37
+ filteredData: MultiComparisonData[];
38
+ }) => void;
39
+ }
40
+
41
+ export const isComparisonAccommodation = (
42
+ data: ComparisonData
43
+ ): data is ComparisonData & DetailResumeAccommodation => {
44
+ return data.Type === ServiceType.ACCOMMODATION;
45
+ };
46
+
47
+ export const isComparisonTransfer = (
48
+ data: ComparisonData
49
+ ): data is ComparisonData & DetailResumeTransfer => {
50
+ return data.Type === ServiceType.TRANSFER;
51
+ };
52
+
53
+ export const isComparisonExcursion = (
54
+ data: ComparisonData
55
+ ): data is ComparisonData & DetailResumeExcursion => {
56
+ return data.Type === ServiceType.EXCURSION;
57
+ };
58
+
59
+ export const isComparisonOtherService = (
60
+ data: ComparisonData
61
+ ): data is ComparisonData & DetailResumeOtherService => {
62
+ return data.Type === ServiceType.OTHER_SERVICE;
63
+ };
64
+
65
+ export const DialogComparison = (props: DialogComparisonProps) => {
66
+ const { open, data, columns, setOpen, onBookNow } = props;
67
+ const [selectedValues, setSelectedValues] = useState<string[]>([]);
68
+ const [filteredData, setFilteredData] = useState<MultiComparisonData[]>(data);
69
+
70
+ const getTotalRows = (comparisonData: ComparisonData[]) => {
71
+ const totalMap = new Map<string, number>();
72
+
73
+ comparisonData.forEach((item) => {
74
+ if (isComparisonAccommodation(item)) {
75
+ const currency = item.Currency;
76
+ const total = parseFloat(item.Total) || 0;
77
+ const currentTotal = totalMap.get(currency) || 0;
78
+ totalMap.set(currency, currentTotal + total);
79
+ }
80
+ if (isComparisonTransfer(item) || isComparisonExcursion(item)) {
81
+ const currency = item.Currency;
82
+ const total = parseFloat(item.TotalPrice) || 0;
83
+ const currentTotal = totalMap.get(currency) || 0;
84
+ totalMap.set(currency, currentTotal + total);
85
+ }
86
+ if (isComparisonOtherService(item)) {
87
+ const currency = item.currency;
88
+ const total = parseFloat(item.total_price) || 0;
89
+ const currentTotal = totalMap.get(currency) || 0;
90
+ totalMap.set(currency, currentTotal + total);
91
+ }
92
+ });
93
+
94
+ return Object.fromEntries(totalMap);
95
+ };
96
+
97
+ const handleSelectionChange = (selectedValues: string[]) => {
98
+ if (selectedValues.length >= 1) {
99
+ setSelectedValues(selectedValues);
100
+ setFilteredData(data.filter((d) => selectedValues.includes(d.id)));
101
+ }
102
+ };
103
+
104
+ useEffect(() => {
105
+ setSelectedValues(data.map((d) => d.id));
106
+ }, [data]);
107
+
108
+ return (
109
+ <DialogBookingConfirm
110
+ title="Comparison of the quotations"
111
+ open={open}
112
+ setOpen={setOpen}
113
+ className="!max-w-[1255px]"
114
+ closeOnOverlayClick>
115
+ <div className="dialog-comparison">
116
+ <div className="dialog-comparison__filter">
117
+ <MultiSelectDropdown
118
+ options={data.map((d) => ({
119
+ id: d.id,
120
+ label: d.name,
121
+ }))}
122
+ selectedValues={selectedValues}
123
+ onSelectionChange={handleSelectionChange}
124
+ maxDisplayedChips={2}
125
+ useTextForMaxDisplayedChips
126
+ />
127
+ </div>
128
+ <div className="dialog-comparison__list">
129
+ {filteredData.map((d, index) => (
130
+ <div key={`cp-${index}`} className="dialog-comparison__item">
131
+ <Chip label={d.name} color="brand" type="outline" size="lg" />
132
+ <Table<ComparisonData>
133
+ data={d.data}
134
+ columns={columns || defaultColumns.comparison()}
135
+ totalRows={getTotalRows(d.data)}
136
+ isTotalBorderDash={false}
137
+ totalSubstractedSpace={0}
138
+ />
139
+ </div>
140
+ ))}
141
+ </div>
142
+ <div className="dialog-comparison__footer">
143
+ <Button
144
+ variant="secondary"
145
+ onClick={() =>
146
+ onBookNow({
147
+ selectedValues,
148
+ filteredData,
149
+ })
150
+ }>
151
+ Book now
152
+ </Button>
153
+ </div>
154
+ </div>
155
+ </DialogBookingConfirm>
156
+ );
157
+ };
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ import Button, { ButtonProps } from '../../atoms/Button/Button';
3
+ import { Text } from '../../atoms/Typography/Typography';
4
+ import { DialogBookingConfirm } from '../DialogBookingConfirm';
5
+
6
+ export interface DialogDeleteConfirmProps {
7
+ open: boolean;
8
+ setOpen: (open: boolean) => void;
9
+ message: string;
10
+ title: string;
11
+ cancelText?: string;
12
+ okText?: string;
13
+ okVariant?: ButtonProps['variant'];
14
+ onOk?: () => void;
15
+ onCancel?: () => void;
16
+ }
17
+
18
+ export const DialogDeleteConfirm: React.FC<DialogDeleteConfirmProps> = (props) => {
19
+ const {
20
+ open,
21
+ setOpen,
22
+ message,
23
+ title,
24
+ cancelText = 'Cancel',
25
+ okText = 'Delete',
26
+ okVariant = 'destructive',
27
+ onOk,
28
+ onCancel,
29
+ } = props;
30
+ return (
31
+ <DialogBookingConfirm
32
+ open={open}
33
+ setOpen={setOpen}
34
+ title={title}
35
+ className="!max-w-[500px]"
36
+ closeOnOverlayClick>
37
+ <div className="space-y-9">
38
+ <Text variant="medium" size="sm" leading="4">
39
+ <span dangerouslySetInnerHTML={{ __html: message }} />
40
+ </Text>
41
+ <div className="grid grid-cols-2 gap-x-4">
42
+ <Button
43
+ variant="outline-secondary"
44
+ onClick={() => {
45
+ setOpen(false);
46
+ onCancel?.();
47
+ }}>
48
+ {cancelText}
49
+ </Button>
50
+ <Button variant={okVariant} onClick={onOk}>
51
+ {okText}
52
+ </Button>
53
+ </div>
54
+ </div>
55
+ </DialogBookingConfirm>
56
+ );
57
+ };
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { DialogBookingConfirm } from '../DialogBookingConfirm';
3
+ import { DialogSendingMailContent } from './DialogSendingMailContent';
4
+
5
+ export interface DialogSendingMailProps {
6
+ open: boolean;
7
+ setOpen: (open: boolean) => void;
8
+ children: React.ReactNode;
9
+ type?: 'booking' | 'quotation';
10
+ }
11
+
12
+ export const DialogSendingMail = (props: DialogSendingMailProps) => {
13
+ const { open, setOpen, children, type = 'booking' } = props;
14
+
15
+ return (
16
+ <DialogBookingConfirm
17
+ open={open}
18
+ title={`Send ${type} via mail`}
19
+ setOpen={setOpen}
20
+ className="!max-w-[800px]"
21
+ closeOnOverlayClick>
22
+ {children}
23
+ </DialogBookingConfirm>
24
+ );
25
+ };
26
+
27
+ DialogSendingMail.Content = DialogSendingMailContent;
@@ -0,0 +1,115 @@
1
+ import { zodResolver } from '@hookform/resolvers/zod';
2
+ import React, { useEffect } from 'react';
3
+ import { useForm } from 'react-hook-form';
4
+ import Button from '../../atoms/Button/Button';
5
+ import Input from '../../atoms/Inputs/Input/Input';
6
+ import Textarea from '../../atoms/Inputs/Textarea/Textarea';
7
+ import Toast from '../../molecules/Toast/Toast';
8
+ import { Form, FormControl, FormField, FormItem, FormMessage } from '../../ui/form';
9
+ import { sendingMailSchema, SendingMailSchema } from './sending-mail-schema';
10
+
11
+ export interface DialogSendingMailContentProps {
12
+ userInfo: {
13
+ firstName: string;
14
+ lastName: string;
15
+ email: string;
16
+ };
17
+ subject: string;
18
+ type: 'booking' | 'quotation';
19
+ onSubmit: (data: SendingMailSchema) => void;
20
+ onPreviewAttachment?: () => void;
21
+ onCancel?: () => void;
22
+ }
23
+
24
+ export const DialogSendingMailContent: React.FC<DialogSendingMailContentProps> = (
25
+ props
26
+ ) => {
27
+ const { userInfo, subject, type, onSubmit, onPreviewAttachment, onCancel } = props;
28
+
29
+ const messageText = () => {
30
+ const name = `${userInfo.firstName} ${userInfo.lastName}`;
31
+ return `Dear Sir/Madam, \n\nPlease find your ${type} for ${name} attached here with.\nWe remain at your disposal for any questions or further clarification.\n\nKind regards,\nThe Mautourco Team`;
32
+ };
33
+
34
+ const form = useForm<SendingMailSchema>({
35
+ resolver: zodResolver(sendingMailSchema),
36
+ defaultValues: {
37
+ email: userInfo.email,
38
+ subject,
39
+ message: messageText(),
40
+ },
41
+ });
42
+
43
+ useEffect(() => {
44
+ form.setValue('subject', subject);
45
+ }, [subject]);
46
+
47
+ return (
48
+ <Form {...form}>
49
+ <form onSubmit={form.handleSubmit(onSubmit)}>
50
+ <div className="space-y-6">
51
+ <FormField
52
+ control={form.control}
53
+ name="email"
54
+ rules={{ required: true }}
55
+ render={({ field }) => (
56
+ <FormItem>
57
+ <div className="relative">
58
+ <FormControl>
59
+ <Input type="email" placeholder="Recipient *" {...field} />
60
+ </FormControl>
61
+ <FormMessage className="absolute bottom-0 translate-y-5" />
62
+ </div>
63
+ </FormItem>
64
+ )}
65
+ />
66
+ <FormField
67
+ control={form.control}
68
+ name="subject"
69
+ render={({ field }) => (
70
+ <FormItem>
71
+ <div className="relative">
72
+ <FormControl>
73
+ <Input placeholder="Subject" {...field} />
74
+ </FormControl>
75
+ <FormMessage className="absolute bottom-0 translate-y-5" />
76
+ </div>
77
+ </FormItem>
78
+ )}
79
+ />
80
+ <FormField
81
+ control={form.control}
82
+ name="message"
83
+ rules={{ required: true }}
84
+ render={({ field }) => (
85
+ <FormItem>
86
+ <div className="relative">
87
+ <FormControl>
88
+ <Textarea placeholder="Write your email here... *" {...field} />
89
+ </FormControl>
90
+ <FormMessage className="absolute bottom-0 translate-y-4" />
91
+ </div>
92
+ </FormItem>
93
+ )}
94
+ />
95
+ <Button type="button" size="sm" onClick={onPreviewAttachment}>
96
+ Preview Attachment
97
+ </Button>
98
+ </div>
99
+ <Toast
100
+ type="warning"
101
+ className="mt-8"
102
+ text="Disclaimer: Email formatting may appear distorted in certain older email clients (e.g Outlook Classic ). Content will remain intact, but the visual layout may differ from the original"
103
+ />
104
+ <div className="flex justify-end gap-4 [&>*]:w-[250px] pb-2 pt-9">
105
+ <Button type="button" variant="outline-secondary" size="sm" onClick={onCancel}>
106
+ Cancel
107
+ </Button>
108
+ <Button type="submit" variant="secondary" size="sm">
109
+ Send
110
+ </Button>
111
+ </div>
112
+ </form>
113
+ </Form>
114
+ );
115
+ };
@@ -0,0 +1,5 @@
1
+ export * from './DialogSendingMail';
2
+ export * from './sending-mail-schema';
3
+
4
+ export type { DialogSendingMailProps } from './DialogSendingMail';
5
+ export type { DialogSendingMailContentProps } from './DialogSendingMailContent';
@@ -0,0 +1,19 @@
1
+ import { EMAIL_REGEX } from '@/src/lib/shared-constant';
2
+ import z from 'zod';
3
+
4
+ export const sendingMailSchema = z.object({
5
+ email: z
6
+ .string()
7
+ .regex(EMAIL_REGEX, {
8
+ message: 'Please enter a valid email',
9
+ })
10
+ .refine((v) => v !== '', {
11
+ error: 'Email is required',
12
+ }),
13
+ subject: z.string().optional(),
14
+ message: z.string().refine((v) => v !== '', {
15
+ error: 'Message is required',
16
+ }),
17
+ });
18
+
19
+ export type SendingMailSchema = z.infer<typeof sendingMailSchema>;
@@ -111,7 +111,7 @@
111
111
  &::after {
112
112
  content: '';
113
113
  position: absolute;
114
- inset: -1px;
114
+ inset: -1px -1px 1px -1px;
115
115
  pointer-events: none;
116
116
  max-width: 100%;
117
117
  background-image:
@@ -192,48 +192,64 @@
192
192
 
193
193
  .table__total {
194
194
  tr {
195
- border: 1px solid transparent;
195
+ border: 1px solid var(--divider-color-default);
196
+ border-left: none;
197
+ border-right: none;
196
198
  position: relative;
197
- &::after {
198
- content: '';
199
- position: absolute;
200
- inset: -1px;
201
- pointer-events: none;
202
- background-image:
203
- repeating-linear-gradient(
204
- to right,
205
- var(--divider-color-default) 0,
206
- var(--divider-color-default) 12px,
207
- transparent 12px,
208
- transparent 24px
209
- ),
210
- repeating-linear-gradient(
211
- to right,
212
- var(--divider-color-default) 0,
213
- var(--divider-color-default) 12px,
214
- transparent 12px,
215
- transparent 24px
216
- );
217
- background-size:
218
- 100% 1px,
219
- 100% 1px;
220
- background-position: top, bottom;
221
- background-repeat: repeat-x, repeat-x;
222
- }
223
199
  }
224
200
  td {
225
201
  padding-block: var(--spacing-padding-px-4);
226
202
  &:last-child {
227
- width: 160px;
228
- @media (min-width: 1680px) {
229
- width: var(--last-column-width);
230
- }
203
+ /* width: 160px;*/
204
+ /* @media (min-width: 1680px) {
205
+ } */
206
+ width: var(--last-column-width);
231
207
  }
232
208
  }
233
209
  }
234
210
 
211
+ .table__total--dashed tr {
212
+ border: 1px solid transparent;
213
+ position: relative;
214
+ &::after {
215
+ content: '';
216
+ position: absolute;
217
+ inset: -1px;
218
+ pointer-events: none;
219
+ background-image:
220
+ repeating-linear-gradient(
221
+ to right,
222
+ var(--divider-color-default) 0,
223
+ var(--divider-color-default) 12px,
224
+ transparent 12px,
225
+ transparent 24px
226
+ ),
227
+ repeating-linear-gradient(
228
+ to right,
229
+ var(--divider-color-default) 0,
230
+ var(--divider-color-default) 12px,
231
+ transparent 12px,
232
+ transparent 24px
233
+ );
234
+ background-size:
235
+ 100% 1px,
236
+ 100% 1px;
237
+ background-position: top, bottom;
238
+ background-repeat: repeat-x, repeat-x;
239
+ }
240
+ }
241
+
235
242
  .table__row-with-children {
236
243
  > td {
237
244
  padding: 0;
238
245
  }
246
+ .table__row-nested {
247
+ border-top: none;
248
+ }
249
+ .table .table__nested-wrapper tr {
250
+ border-top: none;
251
+ &:last-child {
252
+ border-bottom: solid 1px var(--color-surface-300);
253
+ }
254
+ }
239
255
  }
@@ -1,3 +1,4 @@
1
+ import { priceFormatter } from '@/src/lib/price-formatter';
1
2
  import { cn } from '@/src/lib/utils';
2
3
  import { AnimatePresence, domAnimation, LazyMotion } from 'motion/react';
3
4
  import * as motion from 'motion/react-m';
@@ -43,6 +44,12 @@ export interface TableProps<T extends TableRowData<T>> {
43
44
 
44
45
  /** Whether the child rows are visible */
45
46
  isGrouped?: boolean;
47
+
48
+ /** Whether the total rows are bordered with a dashed border */
49
+ isTotalBorderDash?: boolean;
50
+
51
+ /** Whether the last column is visible */
52
+ totalSubstractedSpace?: number;
46
53
  }
47
54
 
48
55
  /**
@@ -133,12 +140,21 @@ const NestedContent = <T extends TableRowData<T>>({
133
140
  *
134
141
  */
135
142
  export const Table = <T extends TableRowData<T>>(props: TableProps<T>) => {
136
- const { columns, data, pagination, isGrouped, totalRows = {}, onClickRow } = props;
143
+ const {
144
+ columns,
145
+ data,
146
+ pagination,
147
+ isGrouped,
148
+ totalRows = {},
149
+ isTotalBorderDash = true,
150
+ totalSubstractedSpace = 10,
151
+ onClickRow,
152
+ } = props;
137
153
 
138
154
  const normalizeLastColumnWidth = () => {
139
155
  const width = columns[columns.length - 1].width;
140
156
  if (typeof width === 'number') {
141
- return `${width - 10}px`;
157
+ return `${width - totalSubstractedSpace}px`;
142
158
  }
143
159
  return width;
144
160
  };
@@ -248,9 +264,12 @@ export const Table = <T extends TableRowData<T>>(props: TableProps<T>) => {
248
264
  </table>
249
265
  </div>
250
266
  {hasTotal && (
251
- <div className="table__total-container">
267
+ <div className={'table__total-container'}>
252
268
  <table className="table">
253
- <tbody className="table__total">
269
+ <tbody
270
+ className={cn('table__total', {
271
+ 'table__total--dashed': isTotalBorderDash,
272
+ })}>
254
273
  <tr>
255
274
  <td colSpan={columns.length - 1}></td>
256
275
  <td
@@ -270,7 +289,7 @@ export const Table = <T extends TableRowData<T>>(props: TableProps<T>) => {
270
289
  {Object.entries(totalRows).map(([currency, total]) => (
271
290
  <div key={currency}>
272
291
  <Text size="md" variant="bold">
273
- {currency} {total}
292
+ {priceFormatter(total, currency)}
274
293
  </Text>
275
294
  </div>
276
295
  ))}
@@ -1,7 +1,7 @@
1
1
  import Button from '@/src/components/atoms/Button/Button';
2
- import Chip from '@/src/components/atoms/Chip/Chip';
3
2
  import { Text } from '@/src/components/atoms/Typography/Typography';
4
3
  import { DateDisplay } from '@/src/components/molecules/DateDisplay/DateDisplay';
4
+ import { PaxChips, PaxCount } from '@/src/components/molecules/PaxChips/PaxChips';
5
5
  import {
6
6
  DetailResumeAccommodation,
7
7
  DetailResumeExcursion,
@@ -136,16 +136,17 @@ export const bookingCancelServiceColumns: (params?: {
136
136
  return <DateDisplay dates={date} direction="vertical" />;
137
137
  },
138
138
  },
139
+
139
140
  {
140
141
  header: 'No. of pax',
141
142
  key: 'Type',
142
143
  width: 329,
143
144
  cell: (value, raw) => {
144
- const pax: Record<'Adult' | 'Teen' | 'Infant' | 'Child', number | undefined> = {
145
- Adult: 0,
146
- Teen: 0,
147
- Infant: 0,
148
- Child: 0,
145
+ const pax: Record<'adult' | 'teen' | 'infant' | 'child', number | undefined> = {
146
+ adult: 0,
147
+ teen: 0,
148
+ infant: 0,
149
+ child: 0,
149
150
  };
150
151
 
151
152
  switch (value) {
@@ -156,37 +157,20 @@ export const bookingCancelServiceColumns: (params?: {
156
157
  | DetailResumeAccommodation
157
158
  | DetailResumeExcursion
158
159
  | DetailResumeTransfer;
159
- pax.Adult = item.AdultCount;
160
- pax.Teen = item.TeenCount;
161
- pax.Infant = item.InfantCount;
162
- pax.Child = item.ChildCount;
160
+ pax.adult = item.AdultCount;
161
+ pax.teen = item.TeenCount;
162
+ pax.infant = item.InfantCount;
163
+ pax.child = item.ChildCount;
163
164
  break;
164
165
  case ServiceType.OTHER_SERVICE:
165
166
  const otherService = raw as DetailResumeOtherService;
166
- pax.Adult = otherService.adult_pax;
167
- pax.Teen = otherService.teen_pax;
168
- pax.Infant = otherService.infant_pax;
169
- pax.Child = otherService.child_pax;
167
+ pax.adult = otherService.adult_pax;
168
+ pax.teen = otherService.teen_pax;
169
+ pax.infant = otherService.infant_pax;
170
+ pax.child = otherService.child_pax;
170
171
  break;
171
172
  }
172
- return (
173
- <div className="flex items-center gap-x-3">
174
- {Object.keys(pax).map((k, index) => {
175
- const count = pax[k as keyof typeof pax] ?? 0;
176
- const type = count > 0 ? 'filled' : 'outline';
177
- return (
178
- <Chip
179
- key={`pax-${index}`}
180
- label={`${k} ${count}`}
181
- size="sm"
182
- color="accent"
183
- type={type}
184
- className="!px-3"
185
- />
186
- );
187
- })}
188
- </div>
189
- );
173
+ return <PaxChips pax={pax as PaxCount} />;
190
174
  },
191
175
  },
192
176
  {
@@ -1,8 +1,8 @@
1
1
  import Button from '@/src/components/atoms/Button/Button';
2
- import Chip from '@/src/components/atoms/Chip/Chip';
3
2
  import { Text } from '@/src/components/atoms/Typography/Typography';
4
3
  import { ActionDropdown } from '@/src/components/molecules/ActionDropdown/ActionDropdown';
5
4
  import { DateDisplay } from '@/src/components/molecules/DateDisplay/DateDisplay';
5
+ import { PaxChips } from '@/src/components/molecules/PaxChips/PaxChips';
6
6
  import { ActionDropdownType } from '@/src/types/table';
7
7
  import { BookingListItem } from '@/src/types/table/booking.types';
8
8
  import { ColumnType } from '../TableCell';
@@ -61,24 +61,7 @@ export const bookingColumns: (params: {
61
61
  const paxDetails = value as BookingListItem['pax_details'];
62
62
  const paxDetailsKeys = Object.keys(paxDetails);
63
63
  if (paxDetailsKeys.length) {
64
- return (
65
- <div className="flex flex-wrap gap-2">
66
- {paxDetailsKeys.map((key) => {
67
- return (
68
- <Chip
69
- label={`${key} ${paxDetails[key as keyof BookingListItem['pax_details']]}`}
70
- type={
71
- paxDetails[key as keyof BookingListItem['pax_details']] > 0
72
- ? 'filled'
73
- : 'outline'
74
- }
75
- color="accent"
76
- size="sm"
77
- />
78
- );
79
- })}
80
- </div>
81
- );
64
+ return <PaxChips pax={paxDetails} />;
82
65
  }
83
66
  return <></>;
84
67
  },