mautourco-components 0.2.15 → 0.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/Icon/icons/BusIcon.js +1 -1
- package/dist/components/atoms/Tab/Tab.css +6 -8
- package/dist/components/atoms/Typography/Typography.d.ts +1 -1
- package/dist/components/atoms/Typography/Typography.js +18 -4
- package/dist/components/molecules/ActionDropdown/ActionDropdown.d.ts +4 -0
- package/dist/components/molecules/ActionDropdown/ActionDropdown.js +2 -2
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.css +2097 -0
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.d.ts +11 -0
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js +20 -0
- package/dist/components/molecules/DateDisplay/DateDisplay.d.ts +9 -2
- package/dist/components/molecules/DateDisplay/DateDisplay.js +5 -5
- package/dist/components/molecules/DetailsInfo/DetailsAction.d.ts +9 -0
- package/dist/components/molecules/DetailsInfo/DetailsAction.js +46 -0
- package/dist/components/molecules/DetailsInfo/DetailsAgency.css +2101 -0
- package/dist/components/molecules/DetailsInfo/DetailsAgency.d.ts +9 -0
- package/dist/components/molecules/DetailsInfo/DetailsAgency.js +19 -0
- package/dist/components/molecules/DetailsInfo/DetailsFile.d.ts +8 -0
- package/dist/components/molecules/DetailsInfo/DetailsFile.js +18 -0
- package/dist/components/molecules/DetailsInfo/DetailsInfo.d.ts +12 -0
- package/dist/components/molecules/DetailsInfo/DetailsInfo.js +22 -0
- package/dist/components/molecules/DetailsInfo/index.d.ts +4 -0
- package/dist/components/molecules/DetailsInfo/index.js +1 -0
- package/dist/components/molecules/ServiceTitle/ServiceTitle.css +2094 -0
- package/dist/components/molecules/ServiceTitle/ServiceTitle.d.ts +8 -0
- package/dist/components/molecules/ServiceTitle/ServiceTitle.js +18 -0
- package/dist/components/molecules/TableServiceItem/DetailsCol.d.ts +2 -2
- package/dist/components/molecules/TableServiceItem/DetailsCol.js +3 -2
- package/dist/components/molecules/TextWithIcon/TextWithIcon.js +2 -2
- package/dist/components/molecules/TimelineItem/ServiceAccommodation.d.ts +9 -0
- package/dist/components/molecules/TimelineItem/ServiceAccommodation.js +20 -0
- package/dist/components/molecules/TimelineItem/ServiceExcursion.d.ts +8 -0
- package/dist/components/molecules/TimelineItem/ServiceExcursion.js +20 -0
- package/dist/components/molecules/TimelineItem/ServiceTransfer.d.ts +11 -0
- package/dist/components/molecules/TimelineItem/ServiceTransfer.js +19 -0
- package/dist/components/molecules/TimelineItem/TimelineHeader.css +2166 -0
- package/dist/components/molecules/TimelineItem/TimelineHeader.d.ts +10 -0
- package/dist/components/molecules/TimelineItem/TimelineHeader.js +21 -0
- package/dist/components/molecules/TimelineItem/TimelineItem.css +2084 -0
- package/dist/components/molecules/TimelineItem/TimelineItem.d.ts +12 -0
- package/dist/components/molecules/TimelineItem/TimelineItem.js +23 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.d.ts +12 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.js +19 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationBody.d.ts +11 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationBody.js +21 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.d.ts +8 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.js +19 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.d.ts +11 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.js +21 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.d.ts +7 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.js +19 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.d.ts +6 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.js +27 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.css +2082 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.d.ts +12 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.js +26 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.d.ts +5 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.js +7 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +2094 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.d.ts +13 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.js +21 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.d.ts +5 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.js +17 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.d.ts +4 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.js +44 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.d.ts +13 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.js +23 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.css +2134 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.d.ts +13 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.js +19 -0
- package/dist/components/organisms/TabCancellationPolicy/index.d.ts +6 -0
- package/dist/components/organisms/TabCancellationPolicy/index.js +3 -0
- package/dist/components/organisms/Table/columns/booking-columns.js +1 -1
- package/dist/components/organisms/Table/columns/detail-resume-columns.js +1 -1
- package/dist/components/organisms/Table/columns/quotation-columns.js +3 -3
- package/dist/components/organisms/Timeline/Timeline.d.ts +15 -0
- package/dist/components/organisms/Timeline/Timeline.js +20 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +5 -0
- package/dist/types/table/action-dropdown-type.types.d.ts +1 -0
- package/dist/types/table/action-dropdown-type.types.js +1 -0
- package/package.json +1 -1
- package/src/components/atoms/Icon/icons/BusIcon.tsx +6 -2
- package/src/components/atoms/Tab/Tab.css +6 -8
- package/src/components/atoms/Typography/Typography.tsx +27 -7
- package/src/components/molecules/ActionDropdown/ActionDropdown.tsx +16 -5
- package/src/components/molecules/Breadcrumbs/Breadcrumbs.css +10 -0
- package/src/components/molecules/Breadcrumbs/Breadcrumbs.tsx +47 -0
- package/src/components/molecules/DateDisplay/DateDisplay.tsx +25 -9
- package/src/components/molecules/DetailsInfo/DetailsAction.tsx +55 -0
- package/src/components/molecules/DetailsInfo/DetailsAgency.css +21 -0
- package/src/components/molecules/DetailsInfo/DetailsAgency.tsx +53 -0
- package/src/components/molecules/DetailsInfo/DetailsFile.tsx +27 -0
- package/src/components/molecules/DetailsInfo/DetailsInfo.tsx +17 -0
- package/src/components/molecules/DetailsInfo/index.ts +4 -0
- package/src/components/molecules/ServiceTitle/ServiceTitle.css +13 -0
- package/src/components/molecules/ServiceTitle/ServiceTitle.tsx +19 -0
- package/src/components/molecules/TableServiceItem/DetailsCol.tsx +9 -5
- package/src/components/molecules/TextWithIcon/TextWithIcon.tsx +19 -5
- package/src/components/molecules/TimelineItem/ServiceAccommodation.tsx +29 -0
- package/src/components/molecules/TimelineItem/ServiceExcursion.tsx +28 -0
- package/src/components/molecules/TimelineItem/ServiceTransfer.tsx +25 -0
- package/src/components/molecules/TimelineItem/TimelineHeader.css +44 -0
- package/src/components/molecules/TimelineItem/TimelineHeader.tsx +41 -0
- package/src/components/molecules/TimelineItem/TimelineItem.css +7 -0
- package/src/components/molecules/TimelineItem/TimelineItem.tsx +17 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationAccom.tsx +41 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationBody.tsx +12 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationExcursion.tsx +31 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationHeader.tsx +11 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationTransfer.tsx +29 -0
- package/src/components/organisms/TabCancellationPolicy/HeaderAccom.tsx +31 -0
- package/src/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.css +3 -0
- package/src/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.tsx +48 -0
- package/src/components/organisms/TabCancellationPolicy/HeaderExcursion.tsx +18 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +8 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.tsx +47 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyExcursion.tsx +26 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyTransfer.tsx +62 -0
- package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicy.tsx +13 -0
- package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.css +39 -0
- package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.tsx +44 -0
- package/src/components/organisms/TabCancellationPolicy/index.ts +7 -0
- package/src/components/organisms/Table/columns/booking-columns.tsx +1 -1
- package/src/components/organisms/Table/columns/detail-resume-columns.tsx +1 -1
- package/src/components/organisms/Table/columns/quotation-columns.tsx +10 -5
- package/src/components/organisms/Timeline/Timeline.tsx +59 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Fragment } from 'react';
|
|
2
|
+
import { Text } from '../../../atoms/Typography/Typography';
|
|
3
|
+
import { DateDisplay } from '../../../molecules/DateDisplay/DateDisplay';
|
|
4
|
+
import TextWithIcon from '../../../molecules/TextWithIcon/TextWithIcon';
|
|
5
|
+
import './PolicyAccom.css';
|
|
6
|
+
|
|
7
|
+
export interface Policy {
|
|
8
|
+
Description: string;
|
|
9
|
+
Value: number;
|
|
10
|
+
ValidFrom: string;
|
|
11
|
+
ValidTo: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface PolicyAccomProps {
|
|
15
|
+
roomName: string;
|
|
16
|
+
policies: Policy[];
|
|
17
|
+
index?: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default function PolicyAccom(props: PolicyAccomProps) {
|
|
21
|
+
const { roomName, policies, index } = props;
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div className="policy-accom">
|
|
25
|
+
<div className="grid gap-y-1">
|
|
26
|
+
<TextWithIcon icon="accom">Room {index !== undefined && index + 1}</TextWithIcon>
|
|
27
|
+
<Text size="sm">{roomName}</Text>
|
|
28
|
+
</div>
|
|
29
|
+
{policies.map((policy, index) => (
|
|
30
|
+
<Fragment key={`policy-${index}`}>
|
|
31
|
+
<Text size="xs" variant="medium" leading="4" className="policy-accom__period">
|
|
32
|
+
Policy period applies{' '}
|
|
33
|
+
<DateDisplay dates={[policy.ValidFrom, policy.ValidTo]} textSize="xs" />
|
|
34
|
+
</Text>
|
|
35
|
+
<div className="space-y-2">
|
|
36
|
+
<Text variant="bold" size="xs" leading="4">
|
|
37
|
+
{policy.Value} % of total price
|
|
38
|
+
</Text>
|
|
39
|
+
<Text size="xs" leading="4">
|
|
40
|
+
{policy.Description}
|
|
41
|
+
</Text>
|
|
42
|
+
</div>
|
|
43
|
+
</Fragment>
|
|
44
|
+
))}
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
2
|
+
|
|
3
|
+
export interface PolicyExcursionProps {
|
|
4
|
+
pickUpPoint: string;
|
|
5
|
+
policies: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default function PolicyExcursion(props: PolicyExcursionProps) {
|
|
9
|
+
const { pickUpPoint, policies } = props;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<div className="policy-excursion space-y-6">
|
|
13
|
+
<div className="space-y-2">
|
|
14
|
+
<Text variant="bold" size="xs" leading="4">
|
|
15
|
+
Pick-up point:
|
|
16
|
+
</Text>
|
|
17
|
+
<Text size="xs" leading="4">
|
|
18
|
+
{pickUpPoint}
|
|
19
|
+
</Text>
|
|
20
|
+
</div>
|
|
21
|
+
<Text size="xs" leading="4">
|
|
22
|
+
{policies}
|
|
23
|
+
</Text>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
2
|
+
import TextWithIcon from '../../molecules/TextWithIcon/TextWithIcon';
|
|
3
|
+
|
|
4
|
+
export interface PolicyTransferProps {
|
|
5
|
+
carName: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const policies = [
|
|
9
|
+
{
|
|
10
|
+
title: 'No Show',
|
|
11
|
+
policy: '100% of applicable fees will be claimed to the Operator',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
title: 'No Show on expected flight and arrives later on another flight',
|
|
15
|
+
policy:
|
|
16
|
+
'An additional no show fee of 50% will be charged on normal fee payable by the Operator',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
title: 'Delayed client due to flight amendment without prior notice (4 hours before)',
|
|
20
|
+
policy: '100% payable by the Operator',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: 'Walk-in client (without booking/voucher)',
|
|
24
|
+
policy: 'Taxi Transfer will be provided to the client at his own expense',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: 'Unexpected client (with voucher but without booking)',
|
|
28
|
+
policy: 'Private transfer will be charged to the Operator',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
title: 'Cancellation less than 24 hours prior arrival',
|
|
32
|
+
policy: '100% applicable fee claimed to the Operator',
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
export default function PolicyTransfer(props: PolicyTransferProps) {
|
|
37
|
+
const { carName } = props;
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<div className="policy-excursion">
|
|
41
|
+
<TextWithIcon icon="car" textVariant="bold" iconSize="md">
|
|
42
|
+
{carName}
|
|
43
|
+
</TextWithIcon>
|
|
44
|
+
<div className="grid grid-cols-2 xl:grid-cols-3 gap-x-4">
|
|
45
|
+
{policies.map((policy, index) => (
|
|
46
|
+
<div key={`policy-${index}`} className="mt-4">
|
|
47
|
+
<Text variant="medium" size="sm" leading="4">
|
|
48
|
+
{policy.title}
|
|
49
|
+
</Text>
|
|
50
|
+
<ul className="pl-8">
|
|
51
|
+
<li className="list-disc">
|
|
52
|
+
<Text size="sm" leading="4">
|
|
53
|
+
{policy.policy}
|
|
54
|
+
</Text>
|
|
55
|
+
</li>
|
|
56
|
+
</ul>
|
|
57
|
+
</div>
|
|
58
|
+
))}
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import CancellationAccom from './CancellationAccom';
|
|
2
|
+
import CancellationExcursion from './CancellationExcursion';
|
|
3
|
+
import CancellationTransfer from './CancellationTransfer';
|
|
4
|
+
import TabCancellationPolicyLayout from './TabCancellationPolicyLayout/TabCancellationPolicyLayout';
|
|
5
|
+
|
|
6
|
+
export default function TabCancellationPolicy(props: React.PropsWithChildren) {
|
|
7
|
+
return <div className="tab-cancellation-policy" {...props} />;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
TabCancellationPolicy.Layout = TabCancellationPolicyLayout;
|
|
11
|
+
TabCancellationPolicy.Accom = CancellationAccom;
|
|
12
|
+
TabCancellationPolicy.Excursion = CancellationExcursion;
|
|
13
|
+
TabCancellationPolicy.Transfer = CancellationTransfer;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.details-cancellation-policy__layout {
|
|
2
|
+
@apply grid gap-y-8;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.details-cancellation-policy__layout-flex {
|
|
6
|
+
@apply flex gap-x-8;
|
|
7
|
+
figure {
|
|
8
|
+
@apply overflow-hidden;
|
|
9
|
+
flex: 0 0 400px;
|
|
10
|
+
height: 400px;
|
|
11
|
+
border-radius: var(--border-radius-rounded-2xl);
|
|
12
|
+
box-shadow: 0 1px 7px rgba(0, 0, 0, 0.19);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.details-cancellation-policy__layout-content {
|
|
17
|
+
@apply flex-1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.details-cancellation-policy__layout-content-header {
|
|
21
|
+
@apply pb-6 relative;
|
|
22
|
+
&::after {
|
|
23
|
+
content: '';
|
|
24
|
+
@apply absolute bottom-0 left-0 right-0;
|
|
25
|
+
height: 1px;
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
background-image: repeating-linear-gradient(
|
|
28
|
+
to right,
|
|
29
|
+
var(--divider-color-default) 0,
|
|
30
|
+
var(--divider-color-default) 8px,
|
|
31
|
+
transparent 8px,
|
|
32
|
+
transparent 16px
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.details-cancellation-policy__layout-content-body {
|
|
38
|
+
@apply pt-6;
|
|
39
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Chip from '../../../atoms/Chip/Chip';
|
|
3
|
+
import { IconName } from '../../../atoms/Icon/Icon';
|
|
4
|
+
import TextWithIcon from '../../../molecules/TextWithIcon/TextWithIcon';
|
|
5
|
+
import './TabCancellationPolicyLayout.css';
|
|
6
|
+
|
|
7
|
+
interface TabCancellationPolicyLayoutProps {
|
|
8
|
+
title: string;
|
|
9
|
+
icon: IconName;
|
|
10
|
+
isOnRequest: boolean;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
image: string;
|
|
13
|
+
header: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default function TabCancellationPolicyLayout(
|
|
17
|
+
props: TabCancellationPolicyLayoutProps
|
|
18
|
+
) {
|
|
19
|
+
const { title, icon, isOnRequest, children, image, header } = props;
|
|
20
|
+
return (
|
|
21
|
+
<div className="details-cancellation-policy__layout">
|
|
22
|
+
<TextWithIcon
|
|
23
|
+
icon={icon}
|
|
24
|
+
color={isOnRequest ? 'yellow' : 'accent'}
|
|
25
|
+
textVariant="bold">
|
|
26
|
+
{title}
|
|
27
|
+
{isOnRequest && <Chip color="yellow">On request</Chip>}
|
|
28
|
+
</TextWithIcon>
|
|
29
|
+
<div className="details-cancellation-policy__layout-flex">
|
|
30
|
+
<figure>
|
|
31
|
+
<img src={image} alt={title} width={400} height={400} />
|
|
32
|
+
</figure>
|
|
33
|
+
<div className="details-cancellation-policy__layout-content">
|
|
34
|
+
<div className="details-cancellation-policy__layout-content-header">
|
|
35
|
+
{header}
|
|
36
|
+
</div>
|
|
37
|
+
<div className="details-cancellation-policy__layout-content-body">
|
|
38
|
+
{children}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './CancellationBody';
|
|
2
|
+
export * from './CancellationHeader';
|
|
3
|
+
export * from './TabCancellationPolicy';
|
|
4
|
+
|
|
5
|
+
export type { CancellationAccomProps } from './CancellationAccom';
|
|
6
|
+
export type { CancellationExcursionProps } from './CancellationExcursion';
|
|
7
|
+
export type { CancellationTransferProps } from './CancellationTransfer';
|
|
@@ -67,7 +67,7 @@ export const quotationColumns: (params: {
|
|
|
67
67
|
width: 260,
|
|
68
68
|
cell: (value) => {
|
|
69
69
|
const dates = value as string[];
|
|
70
|
-
return <DateDisplay
|
|
70
|
+
return <DateDisplay dates={dates} />;
|
|
71
71
|
},
|
|
72
72
|
},
|
|
73
73
|
{
|
|
@@ -105,10 +105,15 @@ export const quotationColumns: (params: {
|
|
|
105
105
|
header: 'Created by',
|
|
106
106
|
key: 'created_by',
|
|
107
107
|
width: 160,
|
|
108
|
-
cell: (value) => (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
cell: (value, raw) => (
|
|
109
|
+
<>
|
|
110
|
+
<Text variant="medium" size="sm" leading="4">
|
|
111
|
+
{raw.file_name},
|
|
112
|
+
</Text>
|
|
113
|
+
<Text variant="bold" size="sm" leading="4">
|
|
114
|
+
{value as string}
|
|
115
|
+
</Text>
|
|
116
|
+
</>
|
|
112
117
|
),
|
|
113
118
|
},
|
|
114
119
|
{
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { cn } from '@/src/lib/utils';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
4
|
+
import TextWithIcon from '../../molecules/TextWithIcon/TextWithIcon';
|
|
5
|
+
import { ServiceAccommodationProps } from '../../molecules/TimelineItem/ServiceAccommodation';
|
|
6
|
+
import { ServiceExcursionProps } from '../../molecules/TimelineItem/ServiceExcursion';
|
|
7
|
+
import { ServiceTransferProps } from '../../molecules/TimelineItem/ServiceTransfer';
|
|
8
|
+
import TimelineItem from '../../molecules/TimelineItem/TimelineItem';
|
|
9
|
+
|
|
10
|
+
export interface TimelineServices {
|
|
11
|
+
type: 'transfer' | 'accommodation' | 'excursion';
|
|
12
|
+
data: ServiceTransferProps | ServiceAccommodationProps | ServiceExcursionProps;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface TimelineProps {
|
|
16
|
+
arrival: string;
|
|
17
|
+
departure: string;
|
|
18
|
+
services: TimelineServices[];
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const Timeline: React.FC<TimelineProps> = (props) => {
|
|
23
|
+
const { arrival, departure, services, className } = props;
|
|
24
|
+
return (
|
|
25
|
+
<div className={cn('space-y-10', className)}>
|
|
26
|
+
<TextWithIcon icon="arrival" color="accent" iconSize="lg">
|
|
27
|
+
Arrival :{' '}
|
|
28
|
+
<Text variant="regular" size="lg" leading="5" color="default" as="span">
|
|
29
|
+
{arrival}
|
|
30
|
+
</Text>
|
|
31
|
+
</TextWithIcon>
|
|
32
|
+
<div className="overflow-x-auto">
|
|
33
|
+
<div className="flex gap-x-3 pb-8 2xl:pb-0">
|
|
34
|
+
{services.map((service, index) => (
|
|
35
|
+
<TimelineItem key={`tm-${index}`}>
|
|
36
|
+
{service.type === 'transfer' && (
|
|
37
|
+
<TimelineItem.Transfer {...(service.data as ServiceTransferProps)} />
|
|
38
|
+
)}
|
|
39
|
+
{service.type === 'accommodation' && (
|
|
40
|
+
<TimelineItem.Accommodation
|
|
41
|
+
{...(service.data as ServiceAccommodationProps)}
|
|
42
|
+
/>
|
|
43
|
+
)}
|
|
44
|
+
{service.type === 'excursion' && (
|
|
45
|
+
<TimelineItem.Excursion {...(service.data as ServiceExcursionProps)} />
|
|
46
|
+
)}
|
|
47
|
+
</TimelineItem>
|
|
48
|
+
))}
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<TextWithIcon icon="departure" color="accent" iconSize="lg">
|
|
52
|
+
Departure :{' '}
|
|
53
|
+
<Text variant="regular" size="lg" leading="5" color="default" as="span">
|
|
54
|
+
{departure}
|
|
55
|
+
</Text>
|
|
56
|
+
</TextWithIcon>
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
};
|