mautourco-components 0.2.12 → 0.2.14

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 (144) hide show
  1. package/dist/components/atoms/Icon/Icon.d.ts +1 -1
  2. package/dist/components/atoms/Icon/Icon.js +1 -1
  3. package/dist/components/atoms/Icon/icons/AccomIcon.d.ts +12 -0
  4. package/dist/components/atoms/Icon/icons/AccomIcon.js +36 -0
  5. package/dist/components/atoms/Icon/icons/ArrowDownOutlineIcon.d.ts +8 -0
  6. package/dist/components/atoms/Icon/icons/ArrowDownOutlineIcon.js +36 -0
  7. package/dist/components/atoms/Icon/icons/ArrowRightOutlineIcon.js +1 -1
  8. package/dist/components/atoms/Icon/icons/BusIcon.d.ts +12 -0
  9. package/dist/components/atoms/Icon/icons/BusIcon.js +36 -0
  10. package/dist/components/atoms/Icon/icons/Calendar2Icon.d.ts +12 -0
  11. package/dist/components/atoms/Icon/icons/Calendar2Icon.js +36 -0
  12. package/dist/components/atoms/Icon/icons/MapIcon.d.ts +8 -0
  13. package/dist/components/atoms/Icon/icons/MapIcon.js +36 -0
  14. package/dist/components/atoms/Icon/icons/MicroIcon.d.ts +12 -0
  15. package/dist/components/atoms/Icon/icons/MicroIcon.js +36 -0
  16. package/dist/components/atoms/Icon/icons/MoreVerticalIcon.d.ts +12 -0
  17. package/dist/components/atoms/Icon/icons/MoreVerticalIcon.js +36 -0
  18. package/dist/components/atoms/Icon/icons/NightIcon.d.ts +12 -0
  19. package/dist/components/atoms/Icon/icons/NightIcon.js +36 -0
  20. package/dist/components/atoms/Icon/icons/QuotationIcon.d.ts +8 -0
  21. package/dist/components/atoms/Icon/icons/QuotationIcon.js +36 -0
  22. package/dist/components/atoms/Icon/icons/RowExcursion.d.ts +16 -0
  23. package/dist/components/atoms/Icon/icons/RowExcursion.js +28 -0
  24. package/dist/components/atoms/Icon/icons/StopWatchIcon.d.ts +12 -0
  25. package/dist/components/atoms/Icon/icons/StopWatchIcon.js +36 -0
  26. package/dist/components/atoms/Icon/icons/Utensils.d.ts +12 -0
  27. package/dist/components/atoms/Icon/icons/Utensils.js +36 -0
  28. package/dist/components/atoms/Icon/icons/WalletIcon.d.ts +12 -0
  29. package/dist/components/atoms/Icon/icons/WalletIcon.js +36 -0
  30. package/dist/components/atoms/Icon/icons/registry.d.ts +12 -0
  31. package/dist/components/atoms/Icon/icons/registry.js +51 -27
  32. package/dist/components/atoms/Typography/Typography.d.ts +3 -1
  33. package/dist/components/atoms/Typography/Typography.js +3 -15
  34. package/dist/components/molecules/ActionDropdown/ActionDropdown.css +2119 -0
  35. package/dist/components/molecules/ActionDropdown/ActionDropdown.d.ts +21 -0
  36. package/dist/components/molecules/ActionDropdown/ActionDropdown.js +34 -0
  37. package/dist/components/molecules/DateDisplay/DateDisplay.d.ts +14 -0
  38. package/dist/components/molecules/DateDisplay/DateDisplay.js +39 -0
  39. package/dist/components/molecules/FromTo/FromTo.d.ts +8 -0
  40. package/dist/components/molecules/FromTo/FromTo.js +24 -0
  41. package/dist/components/molecules/TableServiceItem/DetailsCol.d.ts +12 -0
  42. package/dist/components/molecules/TableServiceItem/DetailsCol.js +17 -0
  43. package/dist/components/molecules/TableServiceItem/ItemCol.d.ts +13 -0
  44. package/dist/components/molecules/TableServiceItem/ItemCol.js +24 -0
  45. package/dist/components/molecules/TableServiceItem/RowAccommodation.d.ts +16 -0
  46. package/dist/components/molecules/TableServiceItem/RowAccommodation.js +37 -0
  47. package/dist/components/molecules/TableServiceItem/RowExcursion.d.ts +16 -0
  48. package/dist/components/molecules/TableServiceItem/RowExcursion.js +22 -0
  49. package/dist/components/molecules/TableServiceItem/RowOtherServices.d.ts +9 -0
  50. package/dist/components/molecules/TableServiceItem/RowOtherServices.js +34 -0
  51. package/dist/components/molecules/TableServiceItem/RowTransfer.d.ts +15 -0
  52. package/dist/components/molecules/TableServiceItem/RowTransfer.js +37 -0
  53. package/dist/components/molecules/TableServiceItem/index.d.ts +17 -0
  54. package/dist/components/molecules/TableServiceItem/index.js +15 -0
  55. package/dist/components/molecules/TextWithIcon/TextWithIcon.d.ts +30 -0
  56. package/dist/components/molecules/TextWithIcon/TextWithIcon.js +31 -0
  57. package/dist/components/molecules/TooltipDisplay/TooltipDisplay.d.ts +13 -0
  58. package/dist/components/molecules/TooltipDisplay/TooltipDisplay.js +18 -0
  59. package/dist/components/organisms/MultipleQuotationDocket/MultipleQuotationDocket.d.ts +64 -0
  60. package/dist/components/organisms/MultipleQuotationDocket/MultipleQuotationDocket.js +45 -0
  61. package/dist/components/organisms/MultipleQuotationDocket/index.d.ts +2 -0
  62. package/dist/components/organisms/MultipleQuotationDocket/index.js +1 -0
  63. package/dist/components/organisms/Table/Table.css +2280 -0
  64. package/dist/components/organisms/Table/Table.d.ts +50 -0
  65. package/dist/components/organisms/Table/Table.js +95 -0
  66. package/dist/components/organisms/Table/TableCell.d.ts +15 -0
  67. package/dist/components/organisms/Table/TableCell.js +16 -0
  68. package/dist/components/organisms/Table/columns/booking-columns.d.ts +7 -0
  69. package/dist/components/organisms/Table/columns/booking-columns.js +83 -0
  70. package/dist/components/organisms/Table/columns/detail-resume-columns.d.ts +3 -0
  71. package/dist/components/organisms/Table/columns/detail-resume-columns.js +178 -0
  72. package/dist/components/organisms/Table/columns/index.d.ts +12 -0
  73. package/dist/components/organisms/Table/columns/index.js +9 -0
  74. package/dist/components/organisms/Table/columns/quotation-columns.d.ts +7 -0
  75. package/dist/components/organisms/Table/columns/quotation-columns.js +91 -0
  76. package/dist/components/organisms/Table/constant.d.ts +6 -0
  77. package/dist/components/organisms/Table/constant.js +24 -0
  78. package/dist/components/organisms/Table/index.d.ts +2 -0
  79. package/dist/components/organisms/Table/index.js +2 -0
  80. package/dist/components/ui/popover.d.ts +3 -3
  81. package/dist/components/ui/popover.js +5 -5
  82. package/dist/components/ui/tooltip.d.ts +7 -0
  83. package/dist/components/ui/tooltip.js +42 -0
  84. package/dist/index.d.ts +43 -33
  85. package/dist/index.js +27 -20
  86. package/dist/styles/components/organism/multiple-quotation-docket.css +2304 -0
  87. package/dist/styles/components/typography.css +1 -0
  88. package/dist/types/table/action-dropdown-type.types.d.ts +5 -0
  89. package/dist/types/table/action-dropdown-type.types.js +6 -0
  90. package/dist/types/table/booking.types.d.ts +16 -0
  91. package/dist/types/table/booking.types.js +1 -0
  92. package/dist/types/table/detail-resume.types.d.ts +155 -0
  93. package/dist/types/table/detail-resume.types.js +7 -0
  94. package/dist/types/table/index.d.ts +3 -0
  95. package/dist/types/table/index.js +3 -0
  96. package/dist/types/table/quotation.types.d.ts +23 -0
  97. package/dist/types/table/quotation.types.js +1 -0
  98. package/package.json +6 -1
  99. package/src/components/atoms/Icon/Icon.tsx +2 -8
  100. package/src/components/atoms/Icon/icons/AccomIcon.tsx +45 -0
  101. package/src/components/atoms/Icon/icons/ArrowDownOutlineIcon.tsx +41 -0
  102. package/src/components/atoms/Icon/icons/ArrowRightOutlineIcon.tsx +2 -7
  103. package/src/components/atoms/Icon/icons/BusIcon.tsx +52 -0
  104. package/src/components/atoms/Icon/icons/Calendar2Icon.tsx +54 -0
  105. package/src/components/atoms/Icon/icons/MapIcon.tsx +48 -0
  106. package/src/components/atoms/Icon/icons/MicroIcon.tsx +45 -0
  107. package/src/components/atoms/Icon/icons/MoreVerticalIcon.tsx +53 -0
  108. package/src/components/atoms/Icon/icons/NightIcon.tsx +45 -0
  109. package/src/components/atoms/Icon/icons/QuotationIcon.tsx +50 -0
  110. package/src/components/atoms/Icon/icons/RowExcursion.tsx +54 -0
  111. package/src/components/atoms/Icon/icons/StopWatchIcon.tsx +45 -0
  112. package/src/components/atoms/Icon/icons/Utensils.tsx +45 -0
  113. package/src/components/atoms/Icon/icons/WalletIcon.tsx +45 -0
  114. package/src/components/atoms/Icon/icons/registry.tsx +52 -28
  115. package/src/components/atoms/Typography/Typography.tsx +22 -30
  116. package/src/components/molecules/ActionDropdown/ActionDropdown.css +23 -0
  117. package/src/components/molecules/ActionDropdown/ActionDropdown.tsx +53 -0
  118. package/src/components/molecules/DateDisplay/DateDisplay.tsx +47 -0
  119. package/src/components/molecules/FromTo/FromTo.tsx +31 -0
  120. package/src/components/molecules/TableServiceItem/DetailsCol.tsx +25 -0
  121. package/src/components/molecules/TableServiceItem/ItemCol.tsx +68 -0
  122. package/src/components/molecules/TableServiceItem/RowAccommodation.tsx +56 -0
  123. package/src/components/molecules/TableServiceItem/RowExcursion.tsx +40 -0
  124. package/src/components/molecules/TableServiceItem/RowOtherServices.tsx +50 -0
  125. package/src/components/molecules/TableServiceItem/RowTransfer.tsx +60 -0
  126. package/src/components/molecules/TableServiceItem/index.ts +24 -0
  127. package/src/components/molecules/TextWithIcon/TextWithIcon.tsx +62 -0
  128. package/src/components/molecules/TooltipDisplay/TooltipDisplay.tsx +32 -0
  129. package/src/components/organisms/CarBookingCard/index.ts +3 -0
  130. package/src/components/organisms/MultipleQuotationDocket/MultipleQuotationDocket.tsx +349 -0
  131. package/src/components/organisms/MultipleQuotationDocket/index.ts +6 -0
  132. package/src/components/organisms/Table/Table.css +185 -0
  133. package/src/components/organisms/Table/Table.tsx +273 -0
  134. package/src/components/organisms/Table/TableCell.tsx +40 -0
  135. package/src/components/organisms/Table/columns/booking-columns.tsx +118 -0
  136. package/src/components/organisms/Table/columns/detail-resume-columns.tsx +226 -0
  137. package/src/components/organisms/Table/columns/index.ts +11 -0
  138. package/src/components/organisms/Table/columns/quotation-columns.tsx +150 -0
  139. package/src/components/organisms/Table/constant.ts +31 -0
  140. package/src/components/organisms/Table/index.ts +2 -0
  141. package/src/components/ui/popover.tsx +10 -10
  142. package/src/components/ui/tooltip.tsx +45 -0
  143. package/src/styles/components/organism/multiple-quotation-docket.css +222 -0
  144. package/src/styles/components/typography.css +4 -0
@@ -0,0 +1,47 @@
1
+ import { format, isValid } from 'date-fns';
2
+ import React, { Fragment, useMemo } from 'react';
3
+ import Icon from '../../atoms/Icon/Icon';
4
+ import { Text } from '../../atoms/Typography/Typography';
5
+
6
+ export interface DateDisplayProps {
7
+ /** Dates to display */
8
+ date: string[] | Date[];
9
+ }
10
+
11
+ /**
12
+ * A component for displaying a list of dates in a readable format.
13
+ *
14
+ * @example
15
+ * <DateDisplay date={['2025-01-01', '2025-01-02']} />
16
+ * @param DateDisplayProps
17
+ * @returns
18
+ */
19
+ export const DateDisplay: React.FC<DateDisplayProps> = ({ date }) => {
20
+ const formattedDate = useMemo(() => {
21
+ return date.map((d) => {
22
+ const dateObj = new Date(d);
23
+ // Check if the date is valid then format it to dd/MM/yyyy format
24
+ if (isValid(dateObj)) {
25
+ return format(dateObj, 'dd/MM/yyyy');
26
+ }
27
+ // If the date is not valid, return the original date
28
+ return d;
29
+ }) as string[];
30
+ }, [date]);
31
+
32
+ return (
33
+ <div className="flex items-center gap-x-3">
34
+ {formattedDate.map((date, index) => (
35
+ <Fragment key={`dd-${index}`}>
36
+ <span className="flex items-center gap-x-2">
37
+ <Icon name="calendar2" size="sm" />
38
+ <Text variant="medium" size="sm">
39
+ {date}
40
+ </Text>
41
+ </span>
42
+ {formattedDate.length > 1 && index === 0 && <Icon name="arrow-right-outline" size="sm" />}
43
+ </Fragment>
44
+ ))}
45
+ </div>
46
+ );
47
+ };
@@ -0,0 +1,31 @@
1
+ import Icon from '../../atoms/Icon/Icon';
2
+ import { Text } from '../../atoms/Typography/Typography';
3
+
4
+ export interface FromToProps {
5
+ from?: string;
6
+ to?: string;
7
+ transferType?: string;
8
+ }
9
+
10
+ const FromTo: React.FC<Omit<FromToProps, 'transferType'>> = (props) => {
11
+ const { from, to } = props;
12
+
13
+ const getTransferLocationName = (location?: string) => {
14
+ if (!location) return '';
15
+ return location.toLowerCase() === 'airport' ? 'Plaisance Airport' : location;
16
+ };
17
+
18
+ return (
19
+ <div className="grid gap-y-1">
20
+ <Text variant="regular" size="sm" leading="5">
21
+ {getTransferLocationName(from)}
22
+ </Text>
23
+ <Icon name="arrow-down-outline" size="sm" />
24
+ <Text variant="regular" size="sm" leading="5">
25
+ {getTransferLocationName(to)}
26
+ </Text>
27
+ </div>
28
+ );
29
+ };
30
+
31
+ export default FromTo;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { IconName } from '../../atoms/Icon/Icon';
3
+ import TextWithIcon from '../TextWithIcon/TextWithIcon';
4
+
5
+ interface DetailsColData {
6
+ icon: IconName;
7
+ value: React.ReactNode;
8
+ }
9
+
10
+ export interface DetailsColProps {
11
+ data: DetailsColData[];
12
+ index?: number;
13
+ }
14
+
15
+ export const DetailsCol: React.FC<DetailsColProps> = (props) => {
16
+ const { data } = props;
17
+
18
+ return (
19
+ <div className="grid gap-y-1">
20
+ {data.map((item) => (
21
+ <TextWithIcon icon={item.icon}>{item.value}</TextWithIcon>
22
+ ))}
23
+ </div>
24
+ );
25
+ };
@@ -0,0 +1,68 @@
1
+ import { Text } from '@/src/components/atoms/Typography/Typography';
2
+ import { cn } from '@/src/lib/utils';
3
+ import Chip from '../../atoms/Chip/Chip';
4
+ import { IconName } from '../../atoms/Icon/Icon';
5
+ import TextWithIcon from '../TextWithIcon/TextWithIcon';
6
+
7
+ export interface ItemColProps {
8
+ serviceType: 'Accommodation' | 'Excursion' | 'Transfer' | 'Other Services';
9
+ serviceName?: string;
10
+ extraTitle?: React.ReactNode;
11
+ offers?: any[];
12
+ status?: string;
13
+ iconName?: IconName;
14
+ showName?: boolean;
15
+ children?: React.ReactNode;
16
+ }
17
+
18
+ export const ItemCol: React.FC<ItemColProps> = (props) => {
19
+ const {
20
+ serviceType,
21
+ serviceName,
22
+ offers,
23
+ status,
24
+ iconName = 'accom',
25
+ showName = true,
26
+ extraTitle,
27
+ children,
28
+ } = props;
29
+
30
+ const isOnRequest = status?.toLowerCase() === 'on request';
31
+
32
+ return (
33
+ <div className={cn('grid', offers?.length && 'gap-y-3')}>
34
+ <div>
35
+ {serviceName && (
36
+ <div className="grid gap-y-1">
37
+ <div className="flex items-center gap-x-2">
38
+ <TextWithIcon icon={iconName} color={isOnRequest ? 'yellow' : 'accent'}>
39
+ {serviceType}
40
+ </TextWithIcon>
41
+ {isOnRequest && <Chip color="yellow">{status}</Chip>}
42
+ {extraTitle}
43
+ </div>
44
+ <Text variant="bold" size="sm">
45
+ {showName && serviceName}
46
+ </Text>
47
+ </div>
48
+ )}
49
+ {children}
50
+ </div>
51
+ {offers && offers.length > 0 && (
52
+ <div>
53
+ <Text variant="bold" size="sm" leading="5">
54
+ Applicable offers:
55
+ </Text>
56
+ <Text variant="regular" size="sm" leading="5">
57
+ {offers.map((o) => {
58
+ const offerValue =
59
+ o.OfferType === 'GIFT' ? o.OfferName : `${o.OfferValue}% offers applied`;
60
+
61
+ return <span>{offerValue}</span>;
62
+ })}
63
+ </Text>
64
+ </div>
65
+ )}
66
+ </div>
67
+ );
68
+ };
@@ -0,0 +1,56 @@
1
+ import { differenceInDays } from 'date-fns';
2
+ import React, { useMemo } from 'react';
3
+ import { DetailsCol as DetailsColComponent } from './DetailsCol';
4
+ import { ItemCol, ItemColProps } from './ItemCol';
5
+
6
+ export interface RowAccommodationProps {
7
+ data: {
8
+ RoomName?: string;
9
+ Dates?: string[];
10
+ ClientCategory?: string;
11
+ MealPlan?: string;
12
+ };
13
+ index?: number;
14
+ }
15
+
16
+ const clientType: Record<string, string> = {
17
+ standard: 'STD',
18
+ honeymooners: 'HMN',
19
+ vip: 'VIP',
20
+ vvip: 'VVIP',
21
+ };
22
+
23
+ export function RowAccommodation() {
24
+ return <></>;
25
+ }
26
+
27
+ const DetailsCol: React.FC<RowAccommodationProps> = (props) => {
28
+ const { data, index = 0 } = props;
29
+
30
+ const stay = useMemo(() => {
31
+ if (data.Dates?.length) {
32
+ return differenceInDays(data.Dates[1], data.Dates[0]);
33
+ }
34
+
35
+ return 0;
36
+ }, [data]);
37
+ return (
38
+ <DetailsColComponent
39
+ data={[
40
+ { icon: 'calendar2', value: `Room ${index + 1} : ${data.RoomName}` },
41
+ { icon: 'night', value: `${stay} Nights` },
42
+ { icon: 'user', value: `Client type : ${clientType[data.ClientCategory?.toLowerCase() as string]}` },
43
+ { icon: 'utensils', value: `Meal plan : ${data.MealPlan}` },
44
+ ]}
45
+ />
46
+ );
47
+ };
48
+
49
+ const FirstCol: React.FC<Omit<ItemColProps, 'serviceType'>> = (props) => {
50
+ const { serviceName, offers, status } = props;
51
+
52
+ return <ItemCol serviceType="Accommodation" serviceName={serviceName} offers={offers} status={status} />;
53
+ };
54
+
55
+ RowAccommodation.FirstCol = FirstCol;
56
+ RowAccommodation.DetailsCol = DetailsCol;
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import { DetailsCol as DetailsColComponent } from './DetailsCol';
3
+ import { ItemCol, ItemColProps } from './ItemCol';
4
+
5
+ export interface RowExcursionProps {
6
+ data: {
7
+ languages?: string[];
8
+ duration?: string;
9
+ accessibility?: string;
10
+ transferType?: string;
11
+ };
12
+ }
13
+
14
+ export function RowExcursion() {
15
+ return <></>;
16
+ }
17
+
18
+ export const DetailsCol: React.FC<RowExcursionProps> = (props) => {
19
+ const { data } = props;
20
+
21
+ return (
22
+ <DetailsColComponent
23
+ data={[
24
+ { icon: 'micro', value: `Languages: ${data.languages?.join(' and ')}` },
25
+ { icon: 'stopwatch', value: `Duration: ${data.duration}` },
26
+ { icon: 'user', value: `Difficulty: ${data.accessibility}` },
27
+ { icon: 'bus', value: `Type: ${data.transferType}` },
28
+ ]}
29
+ />
30
+ );
31
+ };
32
+
33
+ const FirstCol: React.FC<Omit<ItemColProps, 'serviceType' | 'status'>> = (props) => {
34
+ const { serviceName, offers } = props;
35
+
36
+ return <ItemCol serviceType="Excursion" serviceName={serviceName} offers={offers} iconName="map" />;
37
+ };
38
+
39
+ RowExcursion.FirstCol = FirstCol;
40
+ RowExcursion.DetailsCol = DetailsCol;
@@ -0,0 +1,50 @@
1
+ import '@/src/index.css';
2
+ import React from 'react';
3
+ import Icon from '../../atoms/Icon/Icon';
4
+ import { Text } from '../../atoms/Typography/Typography';
5
+ import { TooltipDisplay } from '../TooltipDisplay/TooltipDisplay';
6
+ import { DetailsCol as DetailsColComponent } from './DetailsCol';
7
+ import { ItemCol, ItemColProps } from './ItemCol';
8
+
9
+ export function RowOtherServices() {
10
+ return <></>;
11
+ }
12
+
13
+ export const DetailsCol = () => {
14
+ return (
15
+ <DetailsColComponent
16
+ data={[
17
+ {
18
+ icon: 'wallet',
19
+ value: (
20
+ <Text
21
+ variant="medium"
22
+ size="sm"
23
+ leading="5"
24
+ as="div"
25
+ className="flex items-center gap-x-2">
26
+ Handling Fee
27
+ <TooltipDisplay content="Handling fee varies and is determined by the final number of people during booking. ">
28
+ <Icon name="info" size="sm" />
29
+ </TooltipDisplay>
30
+ </Text>
31
+ ),
32
+ },
33
+ ]}
34
+ />
35
+ );
36
+ };
37
+
38
+ const FirstCol: React.FC<Omit<ItemColProps, 'serviceType' | 'status'>> = (props) => {
39
+ return (
40
+ <ItemCol
41
+ serviceType="Other Services"
42
+ iconName="more"
43
+ serviceName="Handling Fee"
44
+ showName={false}
45
+ />
46
+ );
47
+ };
48
+
49
+ RowOtherServices.FirstCol = FirstCol;
50
+ RowOtherServices.DetailsCol = DetailsCol;
@@ -0,0 +1,60 @@
1
+ import React from 'react';
2
+ import { Text } from '../../atoms/Typography/Typography';
3
+ import FromTo, { FromToProps } from '../FromTo/FromTo';
4
+ import { DetailsCol as DetailsColComponent } from './DetailsCol';
5
+ import { ItemCol, ItemColProps } from './ItemCol';
6
+
7
+ export interface RowTransferProps {
8
+ data: {
9
+ carType?: string;
10
+ clientType?: string;
11
+ };
12
+ }
13
+
14
+ const transferTypeMap: Record<string, string> = {
15
+ ARV: 'Arrival',
16
+ DEP: 'Departure',
17
+ INH: 'Inter-Hotel',
18
+ };
19
+
20
+ export function RowTransfer() {
21
+ return <></>;
22
+ }
23
+
24
+ export const DetailsCol: React.FC<RowTransferProps> = (props) => {
25
+ const { data } = props;
26
+
27
+ return (
28
+ <DetailsColComponent
29
+ data={[
30
+ { icon: 'car', value: data.carType },
31
+ { icon: 'user', value: `Client type: ${data.clientType}` },
32
+ ]}
33
+ />
34
+ );
35
+ };
36
+
37
+ const FirstCol: React.FC<Omit<ItemColProps, 'serviceType' | 'status'> & FromToProps> = (
38
+ props
39
+ ) => {
40
+ const { serviceName, offers, transferType, from, to } = props;
41
+
42
+ return (
43
+ <ItemCol
44
+ serviceType="Transfer"
45
+ serviceName={serviceName}
46
+ offers={offers}
47
+ iconName="car"
48
+ showName={false}
49
+ extraTitle={
50
+ <Text variant="bold" size="sm" className="italic">
51
+ {transferTypeMap[transferType as string]}
52
+ </Text>
53
+ }>
54
+ <FromTo from={from} to={to} />
55
+ </ItemCol>
56
+ );
57
+ };
58
+
59
+ RowTransfer.FirstCol = FirstCol;
60
+ RowTransfer.DetailsCol = DetailsCol;
@@ -0,0 +1,24 @@
1
+ import { DetailsCol, type DetailsColProps } from './DetailsCol';
2
+ import { ItemCol, type ItemColProps } from './ItemCol';
3
+ import { RowAccommodation, type RowAccommodationProps } from './RowAccommodation';
4
+ import { RowExcursion, type RowExcursionProps } from './RowExcursion';
5
+ import { RowOtherServices } from './RowOtherServices';
6
+ import { RowTransfer, type RowTransferProps } from './RowTransfer';
7
+
8
+ const TableServiceItem = {
9
+ DetailsCol,
10
+ ItemCol,
11
+ RowAccommodation,
12
+ RowExcursion,
13
+ RowOtherServices,
14
+ RowTransfer,
15
+ };
16
+
17
+ export type {
18
+ DetailsColProps,
19
+ ItemColProps,
20
+ RowAccommodationProps,
21
+ RowExcursionProps,
22
+ RowTransferProps,
23
+ };
24
+ export default TableServiceItem;
@@ -0,0 +1,62 @@
1
+ import { cn } from '@/src/lib/utils';
2
+ import Icon, { IconName } from '../../atoms/Icon/Icon';
3
+ import { Text, TextColor, TextLeading, TextVariant } from '../../atoms/Typography/Typography';
4
+
5
+ export interface TextWithIconProps {
6
+ /** Icon to display */
7
+ icon: IconName;
8
+
9
+ /** Icon size */
10
+ iconSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
11
+
12
+ /** Children to display */
13
+ children: React.ReactNode;
14
+
15
+ /** Color of the text */
16
+ color?: TextColor;
17
+
18
+ /** Leading of the text */
19
+ textLeading?: TextLeading;
20
+
21
+ /** Variant of the text */
22
+ textVariant?: TextVariant;
23
+ }
24
+
25
+ /**
26
+ * A component that displays a text with an icon.
27
+ *
28
+ * @example
29
+ * <TextWithIcon icon="calendar" color="yellow">
30
+ * 20/12/2025
31
+ * </TextWithIcon>
32
+ *
33
+ * @param TextWithIconProps
34
+ * @returns
35
+ */
36
+ const TextWithIcon: React.FC<TextWithIconProps> = (props) => {
37
+ const { icon, children, iconSize = 'sm', color = 'default', textLeading = '5', textVariant = 'medium' } = props;
38
+
39
+ return (
40
+ <div
41
+ className={cn(
42
+ 'flex items-center gap-x-2',
43
+ color === 'yellow' && 'text-[var(--color-yellow-600)]',
44
+ color === 'accent' && 'text-[var(--color-text-accent)]'
45
+ )}>
46
+ <span>
47
+ <Icon name={icon} size={iconSize} />
48
+ </span>
49
+ <Text
50
+ variant={textVariant}
51
+ size={iconSize}
52
+ className="flex items-center gap-x-2"
53
+ color={color}
54
+ leading={textLeading}
55
+ as="div">
56
+ {children}
57
+ </Text>
58
+ </div>
59
+ );
60
+ };
61
+
62
+ export default TextWithIcon;
@@ -0,0 +1,32 @@
1
+ import { TooltipContentProps } from '@radix-ui/react-tooltip';
2
+ import React from 'react';
3
+ import { Text } from '../../atoms/Typography/Typography';
4
+ import { Tooltip, TooltipContent, TooltipTrigger } from '../../ui/tooltip';
5
+
6
+ export interface TooltipDisplayProps {
7
+ /** Trigger element */
8
+ children: React.ReactNode;
9
+
10
+ /** Tooltip content */
11
+ content: string;
12
+
13
+ /** Side of the tooltip */
14
+ side?: TooltipContentProps['side'];
15
+
16
+ /** Maximum width of the tooltip */
17
+ maxWidth?: `${number}px`;
18
+ }
19
+
20
+ export const TooltipDisplay: React.FC<TooltipDisplayProps> = (props) => {
21
+ const { children, content, side = 'right', maxWidth = '300px' } = props;
22
+ return (
23
+ <Tooltip>
24
+ <TooltipTrigger className="text-[var(--color-icon-branded)]">{children}</TooltipTrigger>
25
+ <TooltipContent className={`max-w-[${maxWidth}]`} side={side}>
26
+ <Text variant="medium" size="sm" className="!text-white">
27
+ {content}
28
+ </Text>
29
+ </TooltipContent>
30
+ </Tooltip>
31
+ );
32
+ };