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,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Chip from '../../atoms/Chip/Chip';
|
|
3
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
4
|
+
import './DetailsAgency.css';
|
|
5
|
+
|
|
6
|
+
export interface DetailsAgencyProps {
|
|
7
|
+
name: string;
|
|
8
|
+
clientType: string;
|
|
9
|
+
isOnRequest: boolean;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const DetailsAgency: React.FC<DetailsAgencyProps> = (props) => {
|
|
14
|
+
const { name, clientType, isOnRequest, children } = props;
|
|
15
|
+
return (
|
|
16
|
+
<div className="flex flex-col gap-y-6 items-end">
|
|
17
|
+
<img src="/images/mautourco-logo.png" alt="Mautourco Logo" width={220} />
|
|
18
|
+
<div className="details-agency">
|
|
19
|
+
<Text variant="bold" color="accent">
|
|
20
|
+
Documents details:
|
|
21
|
+
</Text>
|
|
22
|
+
<div className="details-agency__content">
|
|
23
|
+
<div className="details-agency__content-item">
|
|
24
|
+
<Text
|
|
25
|
+
variant="bold"
|
|
26
|
+
size="sm"
|
|
27
|
+
leading="4"
|
|
28
|
+
className="details-agency__content-item-name">
|
|
29
|
+
Agency
|
|
30
|
+
</Text>
|
|
31
|
+
<Text size="sm" leading="4">
|
|
32
|
+
{name}
|
|
33
|
+
</Text>
|
|
34
|
+
</div>{' '}
|
|
35
|
+
<div className="details-agency__content-item">
|
|
36
|
+
<Text
|
|
37
|
+
variant="bold"
|
|
38
|
+
size="sm"
|
|
39
|
+
leading="4"
|
|
40
|
+
className="details-agency__content-item-name">
|
|
41
|
+
Client type
|
|
42
|
+
</Text>
|
|
43
|
+
<Text size="sm" leading="4">
|
|
44
|
+
{clientType}
|
|
45
|
+
</Text>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
{isOnRequest && <Chip color="yellow">Waiting for confirmation</Chip>}
|
|
50
|
+
{children}
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { cn } from '@/src/lib/utils';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
4
|
+
|
|
5
|
+
export interface DetailsFileProps {
|
|
6
|
+
number: string;
|
|
7
|
+
name: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
isBig?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const DetailsFile: React.FC<DetailsFileProps> = (props) => {
|
|
13
|
+
const { number, name, label = 'File number:', isBig = false } = props;
|
|
14
|
+
return (
|
|
15
|
+
<div className="grid gap-y-2">
|
|
16
|
+
<Text
|
|
17
|
+
variant={isBig ? 'bold' : 'regular'}
|
|
18
|
+
className={cn(isBig && 'text-2xl')}
|
|
19
|
+
color={isBig ? 'brand' : 'default'}>
|
|
20
|
+
{label} {number}
|
|
21
|
+
</Text>
|
|
22
|
+
<Text variant="medium" color="accent">
|
|
23
|
+
{name}
|
|
24
|
+
</Text>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cn } from '@/src/lib/utils';
|
|
2
|
+
import { DetailsAction } from './DetailsAction';
|
|
3
|
+
import { DetailsAgency } from './DetailsAgency';
|
|
4
|
+
import { DetailsFile } from './DetailsFile';
|
|
5
|
+
|
|
6
|
+
export interface DetailsInfoProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function DetailsInfo(props: DetailsInfoProps) {
|
|
12
|
+
return <div className={cn('details-info', props.className)} {...props} />;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
DetailsInfo.File = DetailsFile;
|
|
16
|
+
DetailsInfo.Agency = DetailsAgency;
|
|
17
|
+
DetailsInfo.Action = DetailsAction;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, TextProps } from '../../atoms/Typography/Typography';
|
|
3
|
+
import './ServiceTitle.css';
|
|
4
|
+
|
|
5
|
+
export interface ServiceTitleProps {
|
|
6
|
+
title: string;
|
|
7
|
+
textSize?: TextProps['size'];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const ServiceTitle: React.FC<ServiceTitleProps> = (props) => {
|
|
11
|
+
const { title, textSize = 'md' } = props;
|
|
12
|
+
return (
|
|
13
|
+
<div className="service-title">
|
|
14
|
+
<Text variant="bold" size={textSize} color="accent">
|
|
15
|
+
{title}
|
|
16
|
+
</Text>
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { cn } from '@/src/lib/utils';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { IconName } from '../../atoms/Icon/Icon';
|
|
3
4
|
import TextWithIcon from '../TextWithIcon/TextWithIcon';
|
|
4
5
|
|
|
5
|
-
interface DetailsColData {
|
|
6
|
+
export interface DetailsColData {
|
|
6
7
|
icon: IconName;
|
|
7
8
|
value: React.ReactNode;
|
|
8
9
|
}
|
|
@@ -10,15 +11,18 @@ interface DetailsColData {
|
|
|
10
11
|
export interface DetailsColProps {
|
|
11
12
|
data: DetailsColData[];
|
|
12
13
|
index?: number;
|
|
14
|
+
className?: string;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
export const DetailsCol: React.FC<DetailsColProps> = (props) => {
|
|
16
|
-
const { data } = props;
|
|
18
|
+
const { data, className } = props;
|
|
17
19
|
|
|
18
20
|
return (
|
|
19
|
-
<div className=
|
|
20
|
-
{data.map((item) => (
|
|
21
|
-
<TextWithIcon icon={item.icon}
|
|
21
|
+
<div className={cn('grid gap-y-1', className)}>
|
|
22
|
+
{data.map((item, index) => (
|
|
23
|
+
<TextWithIcon icon={item.icon} key={`dc-${index}`}>
|
|
24
|
+
{item.value}
|
|
25
|
+
</TextWithIcon>
|
|
22
26
|
))}
|
|
23
27
|
</div>
|
|
24
28
|
);
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { cn } from '@/src/lib/utils';
|
|
2
2
|
import Icon, { IconName } from '../../atoms/Icon/Icon';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Text,
|
|
5
|
+
TextColor,
|
|
6
|
+
TextLeading,
|
|
7
|
+
TextVariant,
|
|
8
|
+
} from '../../atoms/Typography/Typography';
|
|
4
9
|
|
|
5
10
|
export interface TextWithIconProps {
|
|
6
11
|
/** Icon to display */
|
|
@@ -34,7 +39,14 @@ export interface TextWithIconProps {
|
|
|
34
39
|
* @returns
|
|
35
40
|
*/
|
|
36
41
|
const TextWithIcon: React.FC<TextWithIconProps> = (props) => {
|
|
37
|
-
const {
|
|
42
|
+
const {
|
|
43
|
+
icon,
|
|
44
|
+
children,
|
|
45
|
+
iconSize = 'sm',
|
|
46
|
+
color = 'default',
|
|
47
|
+
textLeading = '5',
|
|
48
|
+
textVariant = 'medium',
|
|
49
|
+
} = props;
|
|
38
50
|
|
|
39
51
|
return (
|
|
40
52
|
<div
|
|
@@ -43,9 +55,11 @@ const TextWithIcon: React.FC<TextWithIconProps> = (props) => {
|
|
|
43
55
|
color === 'yellow' && 'text-[var(--color-yellow-600)]',
|
|
44
56
|
color === 'accent' && 'text-[var(--color-text-accent)]'
|
|
45
57
|
)}>
|
|
46
|
-
|
|
47
|
-
<
|
|
48
|
-
|
|
58
|
+
{icon && (
|
|
59
|
+
<span>
|
|
60
|
+
<Icon name={icon} size={iconSize} />
|
|
61
|
+
</span>
|
|
62
|
+
)}
|
|
49
63
|
<Text
|
|
50
64
|
variant={textVariant}
|
|
51
65
|
size={iconSize}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
3
|
+
import { DateDisplay } from '../DateDisplay/DateDisplay';
|
|
4
|
+
import { DetailsCol, DetailsColData } from '../TableServiceItem/DetailsCol';
|
|
5
|
+
import { TimelineHeader } from './TimelineHeader';
|
|
6
|
+
|
|
7
|
+
export interface ServiceAccommodationProps {
|
|
8
|
+
hotelName: string;
|
|
9
|
+
details: DetailsColData[];
|
|
10
|
+
dates: string[] | Date[];
|
|
11
|
+
isOnRequest?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const ServiceAccommodation: React.FC<ServiceAccommodationProps> = (props) => {
|
|
15
|
+
const { hotelName, details, dates, isOnRequest } = props;
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div className="space-y-3">
|
|
19
|
+
<TimelineHeader icon="accom" title="Accomodation" isOnRequest={isOnRequest} />
|
|
20
|
+
<Text variant="bold" size="sm" leading="5">
|
|
21
|
+
{hotelName}
|
|
22
|
+
</Text>
|
|
23
|
+
<div className="space-y-2">
|
|
24
|
+
<DateDisplay dates={dates} />
|
|
25
|
+
<DetailsCol data={details} className="gap-y-2" />
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
3
|
+
import { DateDisplay } from '../DateDisplay/DateDisplay';
|
|
4
|
+
import { DetailsCol, DetailsColData } from '../TableServiceItem/DetailsCol';
|
|
5
|
+
import { TimelineHeader } from './TimelineHeader';
|
|
6
|
+
|
|
7
|
+
export interface ServiceExcursionProps {
|
|
8
|
+
name: string;
|
|
9
|
+
details: DetailsColData[];
|
|
10
|
+
date: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const ServiceExcursion: React.FC<ServiceExcursionProps> = (props) => {
|
|
14
|
+
const { name, details, date } = props;
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div className="space-y-3">
|
|
18
|
+
<TimelineHeader icon="map" title="Excursion" />
|
|
19
|
+
<Text variant="bold" size="sm" leading="5">
|
|
20
|
+
{name}
|
|
21
|
+
</Text>
|
|
22
|
+
<div className="space-y-2">
|
|
23
|
+
<DateDisplay dates={[date]} />
|
|
24
|
+
<DetailsCol data={details} className="gap-y-2" />
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import FromTo from '../FromTo/FromTo';
|
|
3
|
+
import { DetailsCol, DetailsColData } from '../TableServiceItem/DetailsCol';
|
|
4
|
+
import { TimelineHeader } from './TimelineHeader';
|
|
5
|
+
|
|
6
|
+
export interface ServiceTransferProps {
|
|
7
|
+
transferType: string;
|
|
8
|
+
location: {
|
|
9
|
+
from: string;
|
|
10
|
+
to: string;
|
|
11
|
+
};
|
|
12
|
+
details: DetailsColData[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const ServiceTransfer: React.FC<ServiceTransferProps> = (props) => {
|
|
16
|
+
const { transferType, location, details } = props;
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div className="space-y-3">
|
|
20
|
+
<TimelineHeader icon="car" title="Transfer" extraText={transferType} />
|
|
21
|
+
<FromTo from={location.from} to={location.to} />
|
|
22
|
+
<DetailsCol data={details} className="gap-y-2" />
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.timeline-header {
|
|
2
|
+
@apply space-y-2;
|
|
3
|
+
min-width: 307px;
|
|
4
|
+
|
|
5
|
+
&.timeline-header--request {
|
|
6
|
+
.timeline-header__icon-container::after {
|
|
7
|
+
content: '';
|
|
8
|
+
@apply absolute top-1/2 left-10 -translate-y-1/2;
|
|
9
|
+
height: 1px;
|
|
10
|
+
background-color: transparent;
|
|
11
|
+
background-image: repeating-linear-gradient(
|
|
12
|
+
to right,
|
|
13
|
+
var(--color-yellow-600) 0,
|
|
14
|
+
var(--color-yellow-600) 8px,
|
|
15
|
+
transparent 8px,
|
|
16
|
+
transparent 16px
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
.timeline-header__icon {
|
|
20
|
+
border-color: var(--color-yellow-600);
|
|
21
|
+
color: var(--color-yellow-600);
|
|
22
|
+
background-color: var(--color-yellow-50);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.timeline-header__icon-container {
|
|
28
|
+
@apply flex items-center relative;
|
|
29
|
+
&::after {
|
|
30
|
+
content: '';
|
|
31
|
+
@apply absolute top-1/2 left-10 right-0 -translate-y-1/2;
|
|
32
|
+
height: 1px;
|
|
33
|
+
background-color: var(--color-border-accent-secondary);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.timeline-header__icon {
|
|
38
|
+
@apply flex items-center justify-center;
|
|
39
|
+
@apply w-8 h-8 shrink-0 grow-0 basis-8;
|
|
40
|
+
@apply rounded-full;
|
|
41
|
+
border: solid 1px var(--color-border-accent-secondary);
|
|
42
|
+
color: var(--color-border-accent-secondary);
|
|
43
|
+
background-color: var(--color-atoll-green-100);
|
|
44
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { cn } from '@/src/lib/utils';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Chip from '../../atoms/Chip/Chip';
|
|
4
|
+
import Icon, { IconName } from '../../atoms/Icon/Icon';
|
|
5
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
6
|
+
import './TimelineHeader.css';
|
|
7
|
+
|
|
8
|
+
export interface TimelineHeaderProps {
|
|
9
|
+
icon: IconName;
|
|
10
|
+
title: string;
|
|
11
|
+
extraText?: string;
|
|
12
|
+
isOnRequest?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const TimelineHeader: React.FC<TimelineHeaderProps> = (props) => {
|
|
16
|
+
const { icon = 'car', title, extraText, isOnRequest = false } = props;
|
|
17
|
+
return (
|
|
18
|
+
<div className={cn('timeline-header', isOnRequest && 'timeline-header--request')}>
|
|
19
|
+
<div className="timeline-header__icon-container">
|
|
20
|
+
<div className="timeline-header__icon">
|
|
21
|
+
<Icon name={icon} />
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div className="flex gap-x-2 items-center">
|
|
25
|
+
<Text
|
|
26
|
+
variant="bold"
|
|
27
|
+
size="md"
|
|
28
|
+
color={isOnRequest ? 'yellow' : 'accent'}
|
|
29
|
+
leading="5">
|
|
30
|
+
{title}
|
|
31
|
+
</Text>
|
|
32
|
+
{extraText && (
|
|
33
|
+
<Text variant="medium" size="md" color="accent" className="italic" leading="5">
|
|
34
|
+
{extraText}
|
|
35
|
+
</Text>
|
|
36
|
+
)}
|
|
37
|
+
{isOnRequest && <Chip color="yellow">On request</Chip>}
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ServiceAccommodation } from './ServiceAccommodation';
|
|
2
|
+
import { ServiceExcursion } from './ServiceExcursion';
|
|
3
|
+
import { ServiceTransfer } from './ServiceTransfer';
|
|
4
|
+
import './TimelineItem.css';
|
|
5
|
+
|
|
6
|
+
export interface TimelineItemProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default function TimelineItem(props: TimelineItemProps) {
|
|
11
|
+
const { children } = props;
|
|
12
|
+
return <div className="timeline-item">{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
TimelineItem.Transfer = ServiceTransfer;
|
|
16
|
+
TimelineItem.Accommodation = ServiceAccommodation;
|
|
17
|
+
TimelineItem.Excursion = ServiceExcursion;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import CancellationBody from './CancellationBody';
|
|
2
|
+
import CancellationHeader from './CancellationHeader';
|
|
3
|
+
import { Policy } from './PolicyAccom/PolicyAccom';
|
|
4
|
+
import DetailsCancellationPolicy from './TabCancellationPolicy';
|
|
5
|
+
|
|
6
|
+
export interface CancellationAccomProps {
|
|
7
|
+
hotelName: string;
|
|
8
|
+
pax: number;
|
|
9
|
+
dates: string[];
|
|
10
|
+
image: string;
|
|
11
|
+
roomPolicies: Array<{
|
|
12
|
+
roomName: string;
|
|
13
|
+
policies: Policy[];
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default function CancellationAccom(props: CancellationAccomProps) {
|
|
18
|
+
const { hotelName, pax, dates, image, roomPolicies } = props;
|
|
19
|
+
return (
|
|
20
|
+
<DetailsCancellationPolicy.Layout
|
|
21
|
+
title="Accommodation"
|
|
22
|
+
icon="accom"
|
|
23
|
+
isOnRequest
|
|
24
|
+
image={image}
|
|
25
|
+
header={
|
|
26
|
+
<CancellationHeader>
|
|
27
|
+
<CancellationHeader.Accom hotelName={hotelName} pax={pax} dates={dates} />
|
|
28
|
+
</CancellationHeader>
|
|
29
|
+
}>
|
|
30
|
+
<CancellationBody>
|
|
31
|
+
{roomPolicies.map((roomPolicy, index) => (
|
|
32
|
+
<CancellationBody.Accom
|
|
33
|
+
key={index}
|
|
34
|
+
roomName={roomPolicy.roomName}
|
|
35
|
+
policies={roomPolicy.policies}
|
|
36
|
+
/>
|
|
37
|
+
))}
|
|
38
|
+
</CancellationBody>
|
|
39
|
+
</DetailsCancellationPolicy.Layout>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PolicyAccom from './PolicyAccom/PolicyAccom';
|
|
3
|
+
import PolicyExcursion from './PolicyExcursion';
|
|
4
|
+
import PolicyTransfer from './PolicyTransfer';
|
|
5
|
+
|
|
6
|
+
export default function CancellationBody(props: React.PropsWithChildren) {
|
|
7
|
+
return <div className="cancellation-body" {...props} />;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
CancellationBody.Accom = PolicyAccom;
|
|
11
|
+
CancellationBody.Excursion = PolicyExcursion;
|
|
12
|
+
CancellationBody.Transfer = PolicyTransfer;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import CancellationBody from './CancellationBody';
|
|
2
|
+
import CancellationHeader from './CancellationHeader';
|
|
3
|
+
import DetailsCancellationPolicy from './TabCancellationPolicy';
|
|
4
|
+
|
|
5
|
+
export interface CancellationExcursionProps {
|
|
6
|
+
name: string;
|
|
7
|
+
date: string;
|
|
8
|
+
image: string;
|
|
9
|
+
pickUpPoint: string;
|
|
10
|
+
policies: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default function CancellationExcursion(props: CancellationExcursionProps) {
|
|
14
|
+
const { name, date, image, pickUpPoint, policies } = props;
|
|
15
|
+
return (
|
|
16
|
+
<DetailsCancellationPolicy.Layout
|
|
17
|
+
title="Excursion"
|
|
18
|
+
icon="map"
|
|
19
|
+
isOnRequest={false}
|
|
20
|
+
image={image}
|
|
21
|
+
header={
|
|
22
|
+
<CancellationHeader>
|
|
23
|
+
<CancellationHeader.Excursion name={name} date={date} />
|
|
24
|
+
</CancellationHeader>
|
|
25
|
+
}>
|
|
26
|
+
<CancellationBody>
|
|
27
|
+
<CancellationBody.Excursion pickUpPoint={pickUpPoint} policies={policies} />
|
|
28
|
+
</CancellationBody>
|
|
29
|
+
</DetailsCancellationPolicy.Layout>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import HeaderAccom from './HeaderAccom';
|
|
2
|
+
import HeaderExcursion from './HeaderExcursion';
|
|
3
|
+
import HeaderTransfer from './HeaderExcursion/HeaderTransfer';
|
|
4
|
+
|
|
5
|
+
export default function CancellationHeader(props: React.PropsWithChildren) {
|
|
6
|
+
return <div className="cancellation-header" {...props} />;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
CancellationHeader.Accom = HeaderAccom;
|
|
10
|
+
CancellationHeader.Excursion = HeaderExcursion;
|
|
11
|
+
CancellationHeader.Transfer = HeaderTransfer;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import CancellationBody from './CancellationBody';
|
|
2
|
+
import CancellationHeader from './CancellationHeader';
|
|
3
|
+
import { TransferData } from './HeaderExcursion/HeaderTransfer';
|
|
4
|
+
import DetailsCancellationPolicy from './TabCancellationPolicy';
|
|
5
|
+
|
|
6
|
+
export interface CancellationTransferProps {
|
|
7
|
+
image: string;
|
|
8
|
+
carName: string;
|
|
9
|
+
transferData: TransferData[];
|
|
10
|
+
}
|
|
11
|
+
export default function CancellationTransfer(props: CancellationTransferProps) {
|
|
12
|
+
const { image, carName, transferData } = props;
|
|
13
|
+
return (
|
|
14
|
+
<DetailsCancellationPolicy.Layout
|
|
15
|
+
title="Transfer"
|
|
16
|
+
icon="car"
|
|
17
|
+
isOnRequest={false}
|
|
18
|
+
image={image}
|
|
19
|
+
header={
|
|
20
|
+
<CancellationHeader>
|
|
21
|
+
<CancellationHeader.Transfer data={transferData} />
|
|
22
|
+
</CancellationHeader>
|
|
23
|
+
}>
|
|
24
|
+
<CancellationBody>
|
|
25
|
+
<CancellationBody.Transfer carName={carName} />
|
|
26
|
+
</CancellationBody>
|
|
27
|
+
</DetailsCancellationPolicy.Layout>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { differenceInDays } from 'date-fns';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { DateDisplay } from '../../molecules/DateDisplay/DateDisplay';
|
|
4
|
+
import { ServiceTitle } from '../../molecules/ServiceTitle/ServiceTitle';
|
|
5
|
+
import TextWithIcon from '../../molecules/TextWithIcon/TextWithIcon';
|
|
6
|
+
|
|
7
|
+
export interface HeaderAccomProps {
|
|
8
|
+
hotelName: string;
|
|
9
|
+
pax: number;
|
|
10
|
+
dates: string[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default function HeaderAccom(props: HeaderAccomProps) {
|
|
14
|
+
const { hotelName, pax, dates } = props;
|
|
15
|
+
|
|
16
|
+
const stay = useMemo(() => {
|
|
17
|
+
if (dates.length) {
|
|
18
|
+
return differenceInDays(dates[1], dates[0]);
|
|
19
|
+
}
|
|
20
|
+
return 0;
|
|
21
|
+
}, [dates]);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div>
|
|
25
|
+
<ServiceTitle title={hotelName} textSize="sm" />
|
|
26
|
+
<TextWithIcon icon="user">{pax} pax</TextWithIcon>
|
|
27
|
+
<DateDisplay dates={dates} arrowSize="xs" calendarSize="xs" />
|
|
28
|
+
<TextWithIcon icon="night">{stay} Nights</TextWithIcon>
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import Icon from '../../../atoms/Icon/Icon';
|
|
2
|
+
import { Text } from '../../../atoms/Typography/Typography';
|
|
3
|
+
import { DateDisplay } from '../../../molecules/DateDisplay/DateDisplay';
|
|
4
|
+
import TextWithIcon from '../../../molecules/TextWithIcon/TextWithIcon';
|
|
5
|
+
import './HeaderTransfer.css';
|
|
6
|
+
|
|
7
|
+
export interface TransferData {
|
|
8
|
+
type: 'ARV' | 'DEP' | 'INH';
|
|
9
|
+
pax: number;
|
|
10
|
+
date: string;
|
|
11
|
+
from: string;
|
|
12
|
+
to: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface HeaderTransferProps {
|
|
16
|
+
data: TransferData[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const transferLabel: Record<TransferData['type'], string> = {
|
|
20
|
+
ARV: 'Arrival',
|
|
21
|
+
DEP: 'Departure',
|
|
22
|
+
INH: 'Inter-Hotel',
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default function HeaderTransfer(props: HeaderTransferProps) {
|
|
26
|
+
const { data } = props;
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div className="transfer-header">
|
|
30
|
+
{data.map((item, index) => (
|
|
31
|
+
<div key={`ht-${index}`}>
|
|
32
|
+
<TextWithIcon icon={item.type === 'DEP' ? 'departure' : 'arrival'}>
|
|
33
|
+
{transferLabel[item.type]}
|
|
34
|
+
</TextWithIcon>
|
|
35
|
+
<TextWithIcon icon="user">{item.pax} pax</TextWithIcon>
|
|
36
|
+
<DateDisplay dates={[item.date]} arrowSize="xs" calendarSize="xs" />
|
|
37
|
+
<Text
|
|
38
|
+
size="sm"
|
|
39
|
+
variant="medium"
|
|
40
|
+
leading="5"
|
|
41
|
+
className="flex items-center gap-x-1">
|
|
42
|
+
{item.from} <Icon name="arrow-right-outline" size="xs" /> {item.to}
|
|
43
|
+
</Text>
|
|
44
|
+
</div>
|
|
45
|
+
))}
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DateDisplay } from '../../molecules/DateDisplay/DateDisplay';
|
|
2
|
+
import { ServiceTitle } from '../../molecules/ServiceTitle/ServiceTitle';
|
|
3
|
+
|
|
4
|
+
export interface HeaderExcursionProps {
|
|
5
|
+
name: string;
|
|
6
|
+
date: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default function HeaderExcursion(props: HeaderExcursionProps) {
|
|
10
|
+
const { name, date } = props;
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div>
|
|
14
|
+
<ServiceTitle title={name} textSize="sm" />
|
|
15
|
+
<DateDisplay dates={[date]} arrowSize="xs" calendarSize="xs" />
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
}
|