mautourco-components 0.2.17 → 0.2.18
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/CardServiceAccom/CardServiceAccom.css +2104 -0
- package/dist/components/atoms/CardServiceAccom/CardServiceAccom.d.ts +7 -0
- package/dist/components/atoms/CardServiceAccom/CardServiceAccom.js +29 -0
- package/dist/components/atoms/Chip/Chip.css +9 -2
- package/dist/components/atoms/Chip/Chip.d.ts +4 -0
- package/dist/components/atoms/Chip/Chip.js +4 -2
- package/dist/components/atoms/Icon/icons/AirIcon.d.ts +4 -0
- package/dist/components/atoms/Icon/icons/AirIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/BikeIcon.d.ts +4 -0
- package/dist/components/atoms/Icon/icons/BikeIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/LuggageIcon.d.ts +4 -0
- package/dist/components/atoms/Icon/icons/LuggageIcon.js +36 -0
- package/dist/components/atoms/Icon/icons/Utensils.js +1 -1
- package/dist/components/atoms/Icon/icons/registry.d.ts +3 -0
- package/dist/components/atoms/Icon/icons/registry.js +6 -0
- package/dist/components/molecules/ActionDropdown/ActionDropdown.css +1 -1
- package/dist/components/molecules/ActionDropdown/ActionDropdown.d.ts +4 -0
- package/dist/components/molecules/ActionDropdown/ActionDropdown.js +18 -8
- package/dist/components/molecules/DetailsInfo/DetailsAction.d.ts +5 -0
- package/dist/components/molecules/DetailsInfo/DetailsAction.js +4 -3
- package/dist/components/molecules/DetailsInfo/{DetailsAgency.d.ts → DetailsAgency/DetailsAgency.d.ts} +4 -0
- package/dist/components/molecules/DetailsInfo/{DetailsAgency.js → DetailsAgency/DetailsAgency.js} +2 -2
- package/dist/components/molecules/DetailsInfo/DetailsClient/DetailsClient.css +2104 -0
- package/dist/components/molecules/DetailsInfo/DetailsClient/DetailsClient.d.ts +13 -0
- package/dist/components/molecules/DetailsInfo/DetailsClient/DetailsClient.js +20 -0
- package/dist/components/molecules/DetailsInfo/DetailsFile.d.ts +7 -1
- package/dist/components/molecules/DetailsInfo/DetailsFile.js +3 -4
- package/dist/components/molecules/DetailsInfo/DetailsInfo.d.ts +2 -1
- package/dist/components/molecules/DetailsInfo/DetailsInfo.js +3 -1
- package/dist/components/molecules/DetailsInfo/index.d.ts +2 -1
- package/dist/components/molecules/GlobalAmenities/GlobalAmenities.d.ts +9 -0
- package/dist/components/molecules/GlobalAmenities/GlobalAmenities.js +19 -0
- package/dist/components/molecules/ServiceInfo/ServiceInfo.css +2109 -0
- package/dist/components/molecules/ServiceInfo/ServiceInfo.d.ts +21 -0
- package/dist/components/molecules/ServiceInfo/ServiceInfo.js +37 -0
- package/dist/components/molecules/ServiceLanguages/ServiceLanguages.d.ts +10 -0
- package/dist/components/molecules/ServiceLanguages/ServiceLanguages.js +19 -0
- package/dist/components/molecules/ServiceLanguages/constant.d.ts +1 -0
- package/dist/components/molecules/ServiceLanguages/constant.js +6 -0
- package/dist/components/molecules/TableServiceItem/RowOtherServices.js +1 -1
- package/dist/components/molecules/TextWithBorderBottom/TextWithBorderBottom.css +2103 -0
- package/dist/components/molecules/TextWithBorderBottom/TextWithBorderBottom.d.ts +4 -0
- package/dist/components/molecules/TextWithBorderBottom/TextWithBorderBottom.js +29 -0
- package/dist/components/molecules/TextWithIcon/TextWithIcon.d.ts +3 -1
- package/dist/components/molecules/TextWithIcon/TextWithIcon.js +2 -2
- package/dist/components/molecules/TooltipDisplay/TooltipDisplay.js +1 -1
- package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.d.ts +3 -4
- package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.js +2 -2
- package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.d.ts +1 -1
- package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.js +1 -1
- package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.js +1 -1
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.css +9 -2
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.d.ts +1 -1
- package/dist/components/organisms/TabServiceDetails/Accommodation.d.ts +26 -0
- package/dist/components/organisms/TabServiceDetails/Accommodation.js +46 -0
- package/dist/components/organisms/TabServiceDetails/DetailContentTransfer.d.ts +9 -0
- package/dist/components/organisms/TabServiceDetails/DetailContentTransfer.js +17 -0
- package/dist/components/organisms/TabServiceDetails/DetailsContentAccom.d.ts +41 -0
- package/dist/components/organisms/TabServiceDetails/DetailsContentAccom.js +65 -0
- package/dist/components/organisms/TabServiceDetails/DetailsContentExcursion.d.ts +18 -0
- package/dist/components/organisms/TabServiceDetails/DetailsContentExcursion.js +20 -0
- package/dist/components/organisms/TabServiceDetails/Excursion.d.ts +7 -0
- package/dist/components/organisms/TabServiceDetails/Excursion.js +29 -0
- package/dist/components/organisms/TabServiceDetails/TabServiceDetails.d.ts +10 -0
- package/dist/components/organisms/TabServiceDetails/TabServiceDetails.js +23 -0
- package/dist/components/organisms/TabServiceDetails/TabServiceDetailsLayout/TabServiceDetailsLayout.css +2143 -0
- package/dist/components/organisms/TabServiceDetails/TabServiceDetailsLayout/TabServiceDetailsLayout.d.ts +35 -0
- package/dist/components/organisms/TabServiceDetails/TabServiceDetailsLayout/TabServiceDetailsLayout.js +39 -0
- package/dist/components/organisms/TabServiceDetails/Transfer.d.ts +12 -0
- package/dist/components/organisms/TabServiceDetails/Transfer.js +19 -0
- package/dist/components/organisms/TabServiceDetails/index.d.ts +4 -0
- package/dist/components/organisms/TabServiceDetails/index.js +1 -0
- package/dist/components/organisms/Table/Table.css +56 -0
- package/dist/components/organisms/Table/Table.js +6 -4
- package/dist/components/organisms/Timeline/Timeline.js +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +6 -1
- package/package.json +2 -1
- package/src/components/atoms/CardServiceAccom/CardServiceAccom.css +22 -0
- package/src/components/atoms/CardServiceAccom/CardServiceAccom.tsx +22 -0
- package/src/components/atoms/Chip/Chip.css +7 -2
- package/src/components/atoms/Chip/Chip.tsx +16 -2
- package/src/components/atoms/Icon/icons/AirIcon.tsx +40 -0
- package/src/components/atoms/Icon/icons/BikeIcon.tsx +40 -0
- package/src/components/atoms/Icon/icons/LuggageIcon.tsx +40 -0
- package/src/components/atoms/Icon/icons/Utensils.tsx +11 -3
- package/src/components/atoms/Icon/icons/registry.tsx +6 -0
- package/src/components/molecules/ActionDropdown/ActionDropdown.css +1 -1
- package/src/components/molecules/ActionDropdown/ActionDropdown.tsx +48 -15
- package/src/components/molecules/DetailsInfo/DetailsAction.tsx +19 -6
- package/src/components/molecules/DetailsInfo/{DetailsAgency.tsx → DetailsAgency/DetailsAgency.tsx} +6 -2
- package/src/components/molecules/DetailsInfo/DetailsClient/DetailsClient.css +10 -0
- package/src/components/molecules/DetailsInfo/DetailsClient/DetailsClient.tsx +56 -0
- package/src/components/molecules/DetailsInfo/DetailsFile.tsx +24 -9
- package/src/components/molecules/DetailsInfo/DetailsInfo.tsx +3 -1
- package/src/components/molecules/DetailsInfo/index.ts +5 -1
- package/src/components/molecules/GlobalAmenities/GlobalAmenities.tsx +35 -0
- package/src/components/molecules/ServiceInfo/ServiceInfo.css +27 -0
- package/src/components/molecules/ServiceInfo/ServiceInfo.tsx +74 -0
- package/src/components/molecules/ServiceLanguages/ServiceLanguages.tsx +33 -0
- package/src/components/molecules/ServiceLanguages/constant.ts +6 -0
- package/src/components/molecules/TableServiceItem/RowOtherServices.tsx +3 -1
- package/src/components/molecules/TextWithBorderBottom/TextWithBorderBottom.css +9 -0
- package/src/components/molecules/TextWithBorderBottom/TextWithBorderBottom.tsx +12 -0
- package/src/components/molecules/TextWithIcon/TextWithIcon.tsx +6 -1
- package/src/components/molecules/TooltipDisplay/TooltipDisplay.tsx +4 -2
- package/src/components/organisms/TabCancellationPolicy/CancellationAccom.tsx +5 -6
- package/src/components/organisms/TabCancellationPolicy/HeaderAccom.tsx +2 -2
- package/src/components/organisms/TabCancellationPolicy/PolicyTransfer.tsx +1 -1
- package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.css +9 -2
- package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.tsx +1 -1
- package/src/components/organisms/TabServiceDetails/Accommodation.tsx +45 -0
- package/src/components/organisms/TabServiceDetails/DetailContentTransfer.tsx +45 -0
- package/src/components/organisms/TabServiceDetails/DetailsContentAccom.tsx +124 -0
- package/src/components/organisms/TabServiceDetails/DetailsContentExcursion.tsx +65 -0
- package/src/components/organisms/TabServiceDetails/Excursion.tsx +20 -0
- package/src/components/organisms/TabServiceDetails/TabServiceDetails.tsx +13 -0
- package/src/components/organisms/TabServiceDetails/TabServiceDetailsLayout/TabServiceDetailsLayout.css +55 -0
- package/src/components/organisms/TabServiceDetails/TabServiceDetailsLayout/TabServiceDetailsLayout.tsx +82 -0
- package/src/components/organisms/TabServiceDetails/Transfer.tsx +34 -0
- package/src/components/organisms/TabServiceDetails/index.ts +5 -0
- package/src/components/organisms/Table/Table.css +54 -0
- package/src/components/organisms/Table/Table.tsx +37 -22
- package/src/components/organisms/Timeline/Timeline.tsx +2 -2
- /package/dist/components/molecules/DetailsInfo/{DetailsAgency.css → DetailsAgency/DetailsAgency.css} +0 -0
- /package/src/components/molecules/DetailsInfo/{DetailsAgency.css → DetailsAgency/DetailsAgency.css} +0 -0
|
@@ -38,7 +38,7 @@ export default function PolicyTransfer(props: PolicyTransferProps) {
|
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
40
|
<div className="policy-excursion">
|
|
41
|
-
<TextWithIcon icon="car" textVariant="bold" iconSize="md">
|
|
41
|
+
<TextWithIcon icon="car" textVariant="bold" iconSize="md" textSize="md">
|
|
42
42
|
{carName}
|
|
43
43
|
</TextWithIcon>
|
|
44
44
|
<div className="grid grid-cols-2 xl:grid-cols-3 gap-x-4">
|
|
@@ -6,10 +6,17 @@
|
|
|
6
6
|
@apply flex gap-x-8;
|
|
7
7
|
figure {
|
|
8
8
|
@apply overflow-hidden;
|
|
9
|
-
flex: 0 0
|
|
10
|
-
height:
|
|
9
|
+
flex: 0 0 300px;
|
|
10
|
+
height: 300px;
|
|
11
11
|
border-radius: var(--border-radius-rounded-2xl);
|
|
12
12
|
box-shadow: 0 1px 7px rgba(0, 0, 0, 0.19);
|
|
13
|
+
@media (min-width: 1280px) {
|
|
14
|
+
flex: 0 0 400px;
|
|
15
|
+
height: 400px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
img {
|
|
19
|
+
object-fit: cover;
|
|
13
20
|
}
|
|
14
21
|
}
|
|
15
22
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DetailsContentAccom, DetailsContentAccomProps } from './DetailsContentAccom';
|
|
3
|
+
import TabServiceDetails from './TabServiceDetails';
|
|
4
|
+
|
|
5
|
+
export interface AccommodationProps extends DetailsContentAccomProps {
|
|
6
|
+
/** Images of the accommodation */
|
|
7
|
+
images: string[];
|
|
8
|
+
/** Whether the accommodation is on request */
|
|
9
|
+
isOnRequest?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Accommodation details tab .
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <Accommodation
|
|
17
|
+
* title="Accommodation"
|
|
18
|
+
* icon="accom"
|
|
19
|
+
* images={['image1.jpg', 'image2.jpg', 'image3.jpg']}
|
|
20
|
+
* mobileContent={<div>Mobile content</div>}
|
|
21
|
+
* isOnRequest={true}
|
|
22
|
+
* >
|
|
23
|
+
* <div>Content</div>
|
|
24
|
+
* </Accommodation.Layout>
|
|
25
|
+
*
|
|
26
|
+
* @param props - Props of the Accommodation component
|
|
27
|
+
* @returns The Accommodation component
|
|
28
|
+
*/
|
|
29
|
+
export const Accommodation: React.FC<AccommodationProps> = (props) => {
|
|
30
|
+
const { images, isOnRequest, ...rest } = props;
|
|
31
|
+
return (
|
|
32
|
+
<TabServiceDetails.Layout
|
|
33
|
+
title="Accommodation"
|
|
34
|
+
icon="accom"
|
|
35
|
+
isOnRequest={isOnRequest}
|
|
36
|
+
images={images}
|
|
37
|
+
mobileContent={
|
|
38
|
+
<div className="mt-8">
|
|
39
|
+
<DetailsContentAccom.Body {...rest} />
|
|
40
|
+
</div>
|
|
41
|
+
}>
|
|
42
|
+
<DetailsContentAccom {...rest} />
|
|
43
|
+
</TabServiceDetails.Layout>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Chip from '../../atoms/Chip/Chip';
|
|
3
|
+
|
|
4
|
+
export interface DetailContentTransferProps {
|
|
5
|
+
pax: string;
|
|
6
|
+
clientType: string;
|
|
7
|
+
carName: string;
|
|
8
|
+
airConditioning?: boolean;
|
|
9
|
+
luggageTruck?: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const DetailContentTransfer: React.FC<DetailContentTransferProps> = (props) => {
|
|
13
|
+
const { pax, clientType, carName, airConditioning, luggageTruck } = props;
|
|
14
|
+
return (
|
|
15
|
+
<div className="flex gap-4">
|
|
16
|
+
<Chip type="outline" color="brand" label={pax} leadingIcon="user" isBlackText />
|
|
17
|
+
<Chip
|
|
18
|
+
type="outline"
|
|
19
|
+
color="brand"
|
|
20
|
+
label={`Client type: ${clientType}`}
|
|
21
|
+
leadingIcon="user"
|
|
22
|
+
isBlackText
|
|
23
|
+
/>
|
|
24
|
+
<Chip type="outline" color="brand" label={carName} leadingIcon="car" isBlackText />
|
|
25
|
+
{airConditioning && (
|
|
26
|
+
<Chip
|
|
27
|
+
type="outline"
|
|
28
|
+
color="brand"
|
|
29
|
+
label="Air conditioning"
|
|
30
|
+
leadingIcon="air"
|
|
31
|
+
isBlackText
|
|
32
|
+
/>
|
|
33
|
+
)}
|
|
34
|
+
{luggageTruck && (
|
|
35
|
+
<Chip
|
|
36
|
+
type="outline"
|
|
37
|
+
color="brand"
|
|
38
|
+
label={`Luggage truck: ${luggageTruck > 1 ? `x${luggageTruck}` : luggageTruck}`}
|
|
39
|
+
leadingIcon="luggage"
|
|
40
|
+
isBlackText
|
|
41
|
+
/>
|
|
42
|
+
)}
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { useMobile } from '@/src/hooks/useMobile';
|
|
2
|
+
import CardServiceAccom from '../../atoms/CardServiceAccom/CardServiceAccom';
|
|
3
|
+
import Chip from '../../atoms/Chip/Chip';
|
|
4
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
5
|
+
import {
|
|
6
|
+
GlobalAmenities,
|
|
7
|
+
GlobalAmenity,
|
|
8
|
+
} from '../../molecules/GlobalAmenities/GlobalAmenities';
|
|
9
|
+
import { TextWithBorderBottom } from '../../molecules/TextWithBorderBottom/TextWithBorderBottom';
|
|
10
|
+
import TextWithIcon from '../../molecules/TextWithIcon/TextWithIcon';
|
|
11
|
+
|
|
12
|
+
export interface RoomsInfo {
|
|
13
|
+
/** Name of the room */
|
|
14
|
+
roomName: string;
|
|
15
|
+
/** Number of pax */
|
|
16
|
+
roomPax: string;
|
|
17
|
+
/** Client type */
|
|
18
|
+
clientType: string;
|
|
19
|
+
/** Meal plan */
|
|
20
|
+
mealPlan: string;
|
|
21
|
+
/** Amenities of the room */
|
|
22
|
+
roomAmenities: string[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface DetailsContentAccomProps {
|
|
26
|
+
/** Title of the room */
|
|
27
|
+
roomTitle: string;
|
|
28
|
+
/** Description of the room */
|
|
29
|
+
roomDescription: string;
|
|
30
|
+
/** Global amenities */
|
|
31
|
+
globalAmenities: GlobalAmenity[];
|
|
32
|
+
/** Rooms info */
|
|
33
|
+
roomsInfo: RoomsInfo[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Body for the DetailsContentAccom component.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* <DetailsContentAccomBody
|
|
41
|
+
* roomsInfo={roomsInfo}
|
|
42
|
+
* globalAmenities={globalAmenities}
|
|
43
|
+
* />
|
|
44
|
+
* @param props - Props of the DetailsContentAccomBody component
|
|
45
|
+
* @returns The DetailsContentAccomBody component
|
|
46
|
+
*/
|
|
47
|
+
const DetailsContentAccomBody = (
|
|
48
|
+
props: Omit<DetailsContentAccomProps, 'roomTitle' | 'roomDescription'>
|
|
49
|
+
) => {
|
|
50
|
+
const { roomsInfo, globalAmenities } = props;
|
|
51
|
+
return (
|
|
52
|
+
<div className="space-y-4">
|
|
53
|
+
<div className="grid grid-cols-2 gap-x-4">
|
|
54
|
+
{roomsInfo.map((room, index) => (
|
|
55
|
+
<div className="space-y-4" key={`ri-${index}`}>
|
|
56
|
+
<TextWithIcon icon="accom" textVariant="bold" textSize="sm">
|
|
57
|
+
{room.roomName}
|
|
58
|
+
</TextWithIcon>
|
|
59
|
+
<div className="flex flex-wrap gap-2">
|
|
60
|
+
<Chip color="brand" type="outline" leadingIcon="user" isBlackText>
|
|
61
|
+
{room.roomPax} pax
|
|
62
|
+
</Chip>
|
|
63
|
+
<Chip color="brand" type="outline" leadingIcon="user" isBlackText>
|
|
64
|
+
{room.clientType}
|
|
65
|
+
</Chip>
|
|
66
|
+
<Chip color="brand" type="outline" leadingIcon="utensils" isBlackText>
|
|
67
|
+
{room.mealPlan}
|
|
68
|
+
</Chip>
|
|
69
|
+
</div>
|
|
70
|
+
<div className="flex flex-wrap gap-2">
|
|
71
|
+
{room.roomAmenities.map((amenity, index) => (
|
|
72
|
+
<Chip key={`ra-${index}`} color="accent" type="outline" isBlackText>
|
|
73
|
+
{amenity}
|
|
74
|
+
</Chip>
|
|
75
|
+
))}
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
))}
|
|
79
|
+
</div>
|
|
80
|
+
<div className="grid grid-cols-2 gap-x-8">
|
|
81
|
+
<GlobalAmenities amenities={globalAmenities} />
|
|
82
|
+
<CardServiceAccom className="flex items-center justify-center">
|
|
83
|
+
<Text variant="bold">Coming soon</Text>
|
|
84
|
+
</CardServiceAccom>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Details content for the Accommodation component.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* <DetailsContentAccom
|
|
95
|
+
* roomTitle="Accommodation"
|
|
96
|
+
* roomDescription="Accommodation description"
|
|
97
|
+
* globalAmenities={globalAmenities}
|
|
98
|
+
* roomsInfo={roomsInfo}
|
|
99
|
+
* />
|
|
100
|
+
*
|
|
101
|
+
* @param props - Props of the DetailsContentAccom component
|
|
102
|
+
* @returns The DetailsContentAccom component
|
|
103
|
+
*/
|
|
104
|
+
export function DetailsContentAccom(props: DetailsContentAccomProps) {
|
|
105
|
+
const { roomTitle, roomDescription, ...rest } = props;
|
|
106
|
+
|
|
107
|
+
const { isMobile } = useMobile(1280);
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<div className="space-y-6">
|
|
111
|
+
<div className="space-y-4">
|
|
112
|
+
<TextWithBorderBottom variant="bold" size="xl">
|
|
113
|
+
{roomTitle}
|
|
114
|
+
</TextWithBorderBottom>
|
|
115
|
+
<Text variant="medium" leading="5">
|
|
116
|
+
{roomDescription}
|
|
117
|
+
</Text>
|
|
118
|
+
</div>
|
|
119
|
+
{!isMobile && <DetailsContentAccomBody {...rest} />}
|
|
120
|
+
</div>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
DetailsContentAccom.Body = DetailsContentAccomBody;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
2
|
+
import { ServiceInfo } from '../../molecules/ServiceInfo/ServiceInfo';
|
|
3
|
+
import { ServiceLanguages } from '../../molecules/ServiceLanguages/ServiceLanguages';
|
|
4
|
+
import { TextWithBorderBottom } from '../../molecules/TextWithBorderBottom/TextWithBorderBottom';
|
|
5
|
+
|
|
6
|
+
export interface ServiceInfoItem {
|
|
7
|
+
languages: string[];
|
|
8
|
+
duration: string;
|
|
9
|
+
meal: string;
|
|
10
|
+
difficulty: string;
|
|
11
|
+
withTransfer?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface DetailsContentExcursionProps {
|
|
15
|
+
/** Title of the excursion */
|
|
16
|
+
excursionTitle: string;
|
|
17
|
+
/** Description of the excursion */
|
|
18
|
+
excursionDescription: string;
|
|
19
|
+
/** Pick-up point */
|
|
20
|
+
pickUpPoint: string;
|
|
21
|
+
/** Service information */
|
|
22
|
+
serviceInfos: ServiceInfoItem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function DetailsContentExcursion(props: DetailsContentExcursionProps) {
|
|
26
|
+
const { excursionTitle, excursionDescription, pickUpPoint, serviceInfos } = props;
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div className="space-y-6">
|
|
30
|
+
<div className="space-y-4">
|
|
31
|
+
<TextWithBorderBottom variant="bold" size="xl">
|
|
32
|
+
{excursionTitle}
|
|
33
|
+
</TextWithBorderBottom>
|
|
34
|
+
<Text variant="medium" leading="5">
|
|
35
|
+
{excursionDescription}
|
|
36
|
+
</Text>
|
|
37
|
+
</div>
|
|
38
|
+
<div className="space-y-2">
|
|
39
|
+
<Text variant="bold" size="sm" leading="4">
|
|
40
|
+
Pick-up point:
|
|
41
|
+
</Text>
|
|
42
|
+
<Text size="sm" leading="4">
|
|
43
|
+
{pickUpPoint}
|
|
44
|
+
</Text>
|
|
45
|
+
</div>
|
|
46
|
+
<ServiceInfo>
|
|
47
|
+
<ServiceInfo.Item icon="micro" label="Languages">
|
|
48
|
+
<ServiceLanguages languages={serviceInfos.languages} />
|
|
49
|
+
</ServiceInfo.Item>
|
|
50
|
+
<ServiceInfo.Item icon="stopwatch" label="Duration">
|
|
51
|
+
{serviceInfos.duration}
|
|
52
|
+
</ServiceInfo.Item>
|
|
53
|
+
<ServiceInfo.Item icon="utensils" label="Meal">
|
|
54
|
+
{serviceInfos.meal}
|
|
55
|
+
</ServiceInfo.Item>
|
|
56
|
+
<ServiceInfo.Item icon="bike" label="Difficulty">
|
|
57
|
+
{serviceInfos.difficulty}
|
|
58
|
+
</ServiceInfo.Item>
|
|
59
|
+
{serviceInfos.withTransfer && (
|
|
60
|
+
<ServiceInfo.Item icon="bus" label="Prise en charge inclus" />
|
|
61
|
+
)}
|
|
62
|
+
</ServiceInfo>
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
DetailsContentExcursion,
|
|
4
|
+
DetailsContentExcursionProps,
|
|
5
|
+
} from './DetailsContentExcursion';
|
|
6
|
+
import TabServiceDetails from './TabServiceDetails';
|
|
7
|
+
|
|
8
|
+
export interface ExcursionProps extends DetailsContentExcursionProps {
|
|
9
|
+
/** Images of the excursion */
|
|
10
|
+
images: string[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const Excursion: React.FC<ExcursionProps> = (props) => {
|
|
14
|
+
const { images, ...rest } = props;
|
|
15
|
+
return (
|
|
16
|
+
<TabServiceDetails.Layout title="Excursion" icon="map" images={images}>
|
|
17
|
+
<DetailsContentExcursion {...rest} />
|
|
18
|
+
</TabServiceDetails.Layout>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Accommodation } from './Accommodation';
|
|
2
|
+
import { Excursion } from './Excursion';
|
|
3
|
+
import TabServiceDetailsLayout from './TabServiceDetailsLayout/TabServiceDetailsLayout';
|
|
4
|
+
import { Transfer } from './Transfer';
|
|
5
|
+
|
|
6
|
+
export default function TabServiceDetails(props: React.PropsWithChildren) {
|
|
7
|
+
return <div className="tab-service-details" {...props} />;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
TabServiceDetails.Layout = TabServiceDetailsLayout;
|
|
11
|
+
TabServiceDetails.Accommodation = Accommodation;
|
|
12
|
+
TabServiceDetails.Excursion = Excursion;
|
|
13
|
+
TabServiceDetails.Transfer = Transfer;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.details-service__layout {
|
|
2
|
+
@apply grid gap-y-8;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.details-service__layout-flex {
|
|
6
|
+
@apply flex gap-x-8;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.details-service__layout-flex-images {
|
|
10
|
+
@apply space-y-4;
|
|
11
|
+
max-width: 300px;
|
|
12
|
+
@media (min-width: 1280px) {
|
|
13
|
+
max-width: 400px;
|
|
14
|
+
}
|
|
15
|
+
figure {
|
|
16
|
+
@apply overflow-hidden;
|
|
17
|
+
flex: 0 0 300px;
|
|
18
|
+
height: 181px;
|
|
19
|
+
border-radius: var(--border-radius-rounded-2xl);
|
|
20
|
+
box-shadow: 0 1px 7px rgba(0, 0, 0, 0.19);
|
|
21
|
+
@media (min-width: 1280px) {
|
|
22
|
+
flex: 0 0 400px;
|
|
23
|
+
height: 241px;
|
|
24
|
+
}
|
|
25
|
+
&.single-image {
|
|
26
|
+
height: 300px;
|
|
27
|
+
@media (min-width: 1280px) {
|
|
28
|
+
height: 400px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
img {
|
|
33
|
+
object-fit: cover;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.details-service__layout-flex-images-grid {
|
|
38
|
+
@apply grid grid-cols-2 gap-x-4;
|
|
39
|
+
figure {
|
|
40
|
+
height: 107px;
|
|
41
|
+
max-width: 100%;
|
|
42
|
+
@media (min-width: 1280px) {
|
|
43
|
+
max-width: 192px;
|
|
44
|
+
height: 143px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.details-service__layout-content {
|
|
50
|
+
@apply flex-1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.details-service__layout-content-body {
|
|
54
|
+
@apply pt-6;
|
|
55
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { useMobile } from '@/src/hooks/useMobile';
|
|
2
|
+
import { cn } from '@/src/lib/utils';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Chip from '../../../atoms/Chip/Chip';
|
|
5
|
+
import { IconName } from '../../../atoms/Icon/Icon';
|
|
6
|
+
import TextWithIcon from '../../../molecules/TextWithIcon/TextWithIcon';
|
|
7
|
+
import './TabServiceDetailsLayout.css';
|
|
8
|
+
|
|
9
|
+
export interface TabServiceDetailsLayoutProps {
|
|
10
|
+
/** Title of the service */
|
|
11
|
+
title: string;
|
|
12
|
+
/** Icon of the service */
|
|
13
|
+
icon: IconName;
|
|
14
|
+
/** Children of the service */
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
/** Images of the service */
|
|
17
|
+
images: string[];
|
|
18
|
+
/** Mobile content of the service */
|
|
19
|
+
mobileContent?: React.ReactNode;
|
|
20
|
+
/** Whether the service is on request */
|
|
21
|
+
isOnRequest?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Layout for the TabServiceDetails component.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* <TabServiceDetails.Layout
|
|
29
|
+
* title="Accommodation"
|
|
30
|
+
* icon="accom"
|
|
31
|
+
* images={['image1.jpg', 'image2.jpg', 'image3.jpg']}
|
|
32
|
+
* mobileContent={<div>Mobile content</div>}
|
|
33
|
+
* isOnRequest={true}
|
|
34
|
+
* >
|
|
35
|
+
* <div>Content</div>
|
|
36
|
+
* </TabServiceDetails.Layout>
|
|
37
|
+
*
|
|
38
|
+
* @param props - Props of the TabServiceDetailsLayout
|
|
39
|
+
* @returns The TabServiceDetailsLayout component
|
|
40
|
+
*/
|
|
41
|
+
export default function TabServiceDetailsLayout(props: TabServiceDetailsLayoutProps) {
|
|
42
|
+
const { title, icon, isOnRequest, children, images, mobileContent } = props;
|
|
43
|
+
const { isMobile } = useMobile(1280);
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div>
|
|
47
|
+
<div className="details-service__layout">
|
|
48
|
+
<TextWithIcon
|
|
49
|
+
icon={icon}
|
|
50
|
+
color={isOnRequest ? 'yellow' : 'accent'}
|
|
51
|
+
textVariant="bold">
|
|
52
|
+
{title}
|
|
53
|
+
{isOnRequest && <Chip color="yellow">On request</Chip>}
|
|
54
|
+
</TextWithIcon>
|
|
55
|
+
<div className="details-service__layout-flex">
|
|
56
|
+
<div className="details-service__layout-flex-images">
|
|
57
|
+
{images[0] && (
|
|
58
|
+
<figure
|
|
59
|
+
key={images[0]}
|
|
60
|
+
className={cn(images.length === 1 && 'single-image')}>
|
|
61
|
+
<img src={images[0]} alt={title} width={400} height={400} />
|
|
62
|
+
</figure>
|
|
63
|
+
)}
|
|
64
|
+
{images.length > 1 && (
|
|
65
|
+
<div className="details-service__layout-flex-images-grid">
|
|
66
|
+
{images.slice(1, 3).map((image) => (
|
|
67
|
+
<figure key={image}>
|
|
68
|
+
<img src={image} alt={title} width={400} height={400} />
|
|
69
|
+
</figure>
|
|
70
|
+
))}
|
|
71
|
+
</div>
|
|
72
|
+
)}
|
|
73
|
+
</div>
|
|
74
|
+
<div className="details-service__layout-content">
|
|
75
|
+
<div className="details-service__layout-content-body">{children}</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
{isMobile && mobileContent}
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import CancellationHeader from '../TabCancellationPolicy/CancellationHeader';
|
|
3
|
+
import { TransferData } from '../TabCancellationPolicy/HeaderExcursion/HeaderTransfer';
|
|
4
|
+
import TabCancellationPolicy from '../TabCancellationPolicy/TabCancellationPolicy';
|
|
5
|
+
import {
|
|
6
|
+
DetailContentTransfer,
|
|
7
|
+
DetailContentTransferProps,
|
|
8
|
+
} from './DetailContentTransfer';
|
|
9
|
+
|
|
10
|
+
export interface TransferProps {
|
|
11
|
+
/** Image of the transfer */
|
|
12
|
+
image: string;
|
|
13
|
+
/** Transfer data */
|
|
14
|
+
transferData: TransferData[];
|
|
15
|
+
/** Details of the transfer */
|
|
16
|
+
transferDetails: DetailContentTransferProps;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const Transfer: React.FC<TransferProps> = (props) => {
|
|
20
|
+
const { image, transferData, transferDetails } = props;
|
|
21
|
+
return (
|
|
22
|
+
<TabCancellationPolicy.Layout
|
|
23
|
+
title="Transfer"
|
|
24
|
+
icon="car"
|
|
25
|
+
image={image}
|
|
26
|
+
header={
|
|
27
|
+
<CancellationHeader>
|
|
28
|
+
<CancellationHeader.Transfer data={transferData} />
|
|
29
|
+
</CancellationHeader>
|
|
30
|
+
}>
|
|
31
|
+
<DetailContentTransfer {...transferDetails} />
|
|
32
|
+
</TabCancellationPolicy.Layout>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './TabServiceDetails';
|
|
2
|
+
|
|
3
|
+
export type { AccommodationProps } from './Accommodation';
|
|
4
|
+
export type { DetailsContentExcursionProps } from './DetailsContentExcursion';
|
|
5
|
+
export type { TabServiceDetailsLayoutProps } from './TabServiceDetailsLayout/TabServiceDetailsLayout';
|
|
@@ -104,6 +104,54 @@
|
|
|
104
104
|
border-bottom: none;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
+
&.table__children--visible {
|
|
108
|
+
@apply relative;
|
|
109
|
+
border: 1px solid transparent;
|
|
110
|
+
border-left: none;
|
|
111
|
+
&::after {
|
|
112
|
+
content: '';
|
|
113
|
+
position: absolute;
|
|
114
|
+
inset: -1px;
|
|
115
|
+
pointer-events: none;
|
|
116
|
+
max-width: 100%;
|
|
117
|
+
background-image:
|
|
118
|
+
repeating-linear-gradient(
|
|
119
|
+
to right,
|
|
120
|
+
var(--color-border-medium) 0,
|
|
121
|
+
var(--color-border-medium) 16px,
|
|
122
|
+
transparent 16px,
|
|
123
|
+
transparent 32px
|
|
124
|
+
),
|
|
125
|
+
repeating-linear-gradient(
|
|
126
|
+
to right,
|
|
127
|
+
var(--color-border-medium) 0,
|
|
128
|
+
var(--color-border-medium) 16px,
|
|
129
|
+
transparent 16px,
|
|
130
|
+
transparent 32px
|
|
131
|
+
),
|
|
132
|
+
repeating-linear-gradient(
|
|
133
|
+
to bottom,
|
|
134
|
+
var(--color-border-medium) 0,
|
|
135
|
+
var(--color-border-medium) 16px,
|
|
136
|
+
transparent 16px,
|
|
137
|
+
transparent 32px
|
|
138
|
+
),
|
|
139
|
+
repeating-linear-gradient(
|
|
140
|
+
to bottom,
|
|
141
|
+
var(--color-border-medium) 0,
|
|
142
|
+
var(--color-border-medium) 16px,
|
|
143
|
+
transparent 16px,
|
|
144
|
+
transparent 32px
|
|
145
|
+
);
|
|
146
|
+
background-size:
|
|
147
|
+
100% 1px,
|
|
148
|
+
100% 1px,
|
|
149
|
+
1px 100%,
|
|
150
|
+
1px 100%;
|
|
151
|
+
background-position: top, bottom, left, right;
|
|
152
|
+
background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
107
155
|
}
|
|
108
156
|
.table__nested-wrapper {
|
|
109
157
|
overflow: hidden;
|
|
@@ -183,3 +231,9 @@
|
|
|
183
231
|
}
|
|
184
232
|
}
|
|
185
233
|
}
|
|
234
|
+
|
|
235
|
+
.table__row-with-children {
|
|
236
|
+
> td {
|
|
237
|
+
padding: 0;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
@@ -197,29 +197,44 @@ export const Table = <T extends TableRowData<T>>(props: TableProps<T>) => {
|
|
|
197
197
|
) : (
|
|
198
198
|
defaultTable
|
|
199
199
|
)
|
|
200
|
+
) : !row.children ? (
|
|
201
|
+
defaultTable
|
|
200
202
|
) : (
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
203
|
+
<tr
|
|
204
|
+
className="table__row-with-children"
|
|
205
|
+
onClick={(e) => onClickRow?.(e, row)}>
|
|
206
|
+
<td
|
|
207
|
+
colSpan={columns.length}
|
|
208
|
+
className={cn({
|
|
209
|
+
'table__children--visible': hasVisibleChildren,
|
|
210
|
+
})}>
|
|
211
|
+
<table className="table">
|
|
212
|
+
<tbody>
|
|
213
|
+
{defaultTable}
|
|
214
|
+
<AnimatePresence initial={false}>
|
|
215
|
+
{hasVisibleChildren && (
|
|
216
|
+
<tr
|
|
217
|
+
key={`nested-${rowIndex}`}
|
|
218
|
+
className={cn('table__no-hover', {
|
|
219
|
+
'table__row-nested':
|
|
220
|
+
row.children && row.children.length > 0,
|
|
221
|
+
})}>
|
|
222
|
+
<td
|
|
223
|
+
colSpan={columns.length}
|
|
224
|
+
className="table__cell-nested">
|
|
225
|
+
<NestedContent<T>
|
|
226
|
+
rowIndex={rowIndex}
|
|
227
|
+
columns={columns}
|
|
228
|
+
children={row.children || []}
|
|
229
|
+
/>
|
|
230
|
+
</td>
|
|
231
|
+
</tr>
|
|
232
|
+
)}
|
|
233
|
+
</AnimatePresence>
|
|
234
|
+
</tbody>
|
|
235
|
+
</table>
|
|
236
|
+
</td>
|
|
237
|
+
</tr>
|
|
223
238
|
)}
|
|
224
239
|
</Fragment>
|
|
225
240
|
);
|