mautourco-components 0.2.165 → 0.2.167

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.
@@ -14,4 +14,10 @@
14
14
 
15
15
  .resume-accom .service-info__item-content::before {
16
16
  background-color: var(--color-border-medium);
17
- }
17
+ }
18
+
19
+ .resume-accom__rooms > :not([hidden]) ~ :not([hidden]) {
20
+ --tw-space-y-reverse: 0;
21
+ margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
22
+ margin-bottom: calc(1rem * var(--tw-space-y-reverse));
23
+ }
@@ -5,7 +5,7 @@ export interface ResumeAccomProps {
5
5
  image: string;
6
6
  dates: string[];
7
7
  clientType: string;
8
- pax: BookingPax;
8
+ pax: BookingPax[];
9
9
  hotelName: string;
10
10
  rooms: Partial<RoomItem>[];
11
11
  }
@@ -11,5 +11,5 @@ import './ResumeAccom.css';
11
11
  export function ResumeAccom(props) {
12
12
  var image = props.image, dates = props.dates, clientType = props.clientType, pax = props.pax, rooms = props.rooms, hotelName = props.hotelName;
13
13
  var stay = useStays(dates).stay;
14
- return (_jsxs(BookingResumeLayout, { title: "Accommodation", icon: "accom", image: image, className: "resume-accom", children: [_jsx(ServiceTitle, { title: hotelName }), _jsxs("div", { className: "space-y-2 mt-4", children: [_jsx(DateDisplay, { dates: dates, colorMode: "green" }), _jsxs(TextWithIcon, { icon: "night", children: [stay, " Nights"] }), _jsxs(Text, { variant: "medium", size: "sm", leading: "4", children: [_jsx("strong", { children: "Client types:" }), " ", clientType] }), _jsx(PaxDisplay, { pax: pax }), _jsx("div", { children: rooms.map(function (room, index) { return (_jsxs("div", { className: "space-y-1", children: [_jsx(TextWithIcon, { icon: "accom", textSize: "sm", textVariant: "medium", children: room.RoomName }), _jsx(ServiceInfo.Item, { icon: "utensils", iconSize: "sm", textSize: "sm", textLeading: "4", textVariant: "medium", label: "Meal-Plan", children: room.MealPlan })] }, "rm-".concat(index))); }) })] })] }));
14
+ return (_jsxs(BookingResumeLayout, { title: "Accommodation", icon: "accom", image: image, className: "resume-accom", children: [_jsx(ServiceTitle, { title: hotelName }), _jsxs("div", { className: "space-y-2 mt-4", children: [_jsx(DateDisplay, { dates: dates, colorMode: "green" }), _jsxs(TextWithIcon, { icon: "night", children: [stay, " Nights"] }), _jsxs(Text, { variant: "medium", size: "sm", leading: "4", children: [_jsx("strong", { children: "Client types:" }), " ", clientType] }), _jsx("div", { className: "resume-accom__rooms", children: rooms.map(function (room, index) { return (_jsxs("div", { children: [_jsx(PaxDisplay, { pax: pax[index] }), _jsxs("div", { className: "space-y-1", children: [_jsx(TextWithIcon, { icon: "accom", textSize: "sm", textVariant: "medium", children: room.RoomName }), _jsx(ServiceInfo.Item, { icon: "utensils", iconSize: "sm", textSize: "sm", textLeading: "4", textVariant: "medium", label: "Meal-Plan", children: room.MealPlan })] })] }, "rm-".concat(index))); }) })] })] }));
15
15
  }
@@ -100,4 +100,18 @@
100
100
  --component-button-color-outline-secondary-background-hover,
101
101
  var(--button-color-outline-secondary-background-hover, #f0fdfb)
102
102
  );
103
+ }
104
+
105
+ .booking-docket__date-range {
106
+ display: flex;
107
+ flex-direction: column;
108
+ }
109
+
110
+ @media (width > 1280px) {
111
+
112
+ .booking-docket__date-range {
113
+ flex-direction: row;
114
+ align-items: center;
115
+ justify-content: space-between;
116
+ }
103
117
  }
@@ -41,5 +41,5 @@ export function BookingDocket(props) {
41
41
  setIsBookingOpen(true);
42
42
  }
43
43
  }, [isBookingOpen, resumes, isDesktop]);
44
- return (_jsx(LazyMotion, { features: domAnimation, children: _jsxs("div", { className: "booking-docket__container", children: [!isDesktop && !isBookingOpen && (_jsx("div", { className: "flex justify-end mb-4", children: _jsxs(motion.button, { className: "booking-docket__mobile-button", onClick: handleBookingOpen, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.3 }, children: [_jsx(Icon, { name: "booking", size: "lg" }), _jsx(Text, { size: "lg", as: "span", variant: "bold", children: "Your booking" }), _jsx(Icon, { name: "eye", size: "lg" })] }, "booking-open") })), _jsx(AnimatePresence, { initial: false, children: isBookingOpen && (_jsx(motion.div, { className: "booking-docket", initial: { height: 0, opacity: 0 }, animate: { height: height, opacity: 1 }, exit: { height: 0 }, children: _jsxs("div", { ref: contentRef, children: [_jsxs("div", { className: "booking-docket__content", children: [_jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx(Heading, { level: 6, color: "accent", as: "h2", children: "Your Booking" }), _jsx("img", { src: logo, alt: "Mautourco Logo", width: 150 })] }), _jsxs("div", { className: "flex flex-col xl:flex-row gap-x-4 xl:items-center", children: [_jsx(Text, { variant: "bold", size: "lg", children: "Booking file date range :" }), _jsx(DateDisplay, { dates: dates })] })] }), _jsx(BookingResume, { children: resumes.map(function (resume, index) { return (_jsxs("div", { children: [resume.type === 'accommodation' && (_jsx(BookingResume.Accommodation, __assign({}, resume.data))), resume.type === 'transfer' && (_jsx(BookingResume.Transfer, __assign({}, resume.data))), resume.type === 'excursion' && (_jsx(BookingResume.Excursion, __assign({}, resume.data))), resume.type === 'otherService' && (_jsx(BookingResume.OtherService, __assign({}, resume.data)))] }, index)); }) })] }), _jsx("div", { className: "booking-docket__bg", children: _jsx(BookingDocketDeco, {}) })] }) }, "booking-docket")) }), !isDesktop && isBookingOpen && (_jsx("div", { className: "flex justify-end mt-10", children: _jsxs(motion.button, { className: "booking-docket__mobile-button", onClick: handleBookingOpen, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.3 }, children: [_jsx(Text, { size: "lg", as: "span", variant: "bold", children: "Close" }), _jsx(Icon, { name: "close-circle", size: "lg" })] }, "booking-close") }))] }) }));
44
+ return (_jsx(LazyMotion, { features: domAnimation, children: _jsxs("div", { className: "booking-docket__container", children: [!isDesktop && !isBookingOpen && (_jsx("div", { className: "flex justify-end mb-4", children: _jsxs(motion.button, { className: "booking-docket__mobile-button", onClick: handleBookingOpen, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.3 }, children: [_jsx(Icon, { name: "booking", size: "lg" }), _jsx(Text, { size: "lg", as: "span", variant: "bold", children: "Your booking" }), _jsx(Icon, { name: "eye", size: "lg" })] }, "booking-open") })), _jsx(AnimatePresence, { initial: false, children: isBookingOpen && (_jsx(motion.div, { className: "booking-docket", initial: { height: 0, opacity: 0 }, animate: { height: height, opacity: 1 }, exit: { height: 0 }, children: _jsxs("div", { ref: contentRef, children: [_jsxs("div", { className: "booking-docket__content", children: [_jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx(Heading, { level: 6, color: "accent", as: "h2", children: "Your Booking" }), _jsx("img", { src: logo, alt: "Mautourco Logo", width: 150 })] }), _jsxs("div", { className: "booking-docket__date-range", children: [_jsx(Text, { variant: "bold", size: "lg", children: "Booking file date range :" }), _jsx(DateDisplay, { dates: dates })] })] }), _jsx(BookingResume, { children: resumes.map(function (resume, index) { return (_jsxs("div", { children: [resume.type === 'accommodation' && (_jsx(BookingResume.Accommodation, __assign({}, resume.data))), resume.type === 'transfer' && (_jsx(BookingResume.Transfer, __assign({}, resume.data))), resume.type === 'excursion' && (_jsx(BookingResume.Excursion, __assign({}, resume.data))), resume.type === 'otherService' && (_jsx(BookingResume.OtherService, __assign({}, resume.data)))] }, index)); }) })] }), _jsx("div", { className: "booking-docket__bg", children: _jsx(BookingDocketDeco, {}) })] }) }, "booking-docket")) }), !isDesktop && isBookingOpen && (_jsx("div", { className: "flex justify-end mt-10", children: _jsxs(motion.button, { className: "booking-docket__mobile-button", onClick: handleBookingOpen, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.3 }, children: [_jsx(Text, { size: "lg", as: "span", variant: "bold", children: "Close" }), _jsx(Icon, { name: "close-circle", size: "lg" })] }, "booking-close") }))] }) }));
45
45
  }
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export { default as Icon } from './components/atoms/Icon/Icon';
7
7
  export { default as DropdownInput } from './components/atoms/Inputs/DropdownInput/DropdownInput';
8
8
  export { default as Input } from './components/atoms/Inputs/Input/Input';
9
9
  export { default as Textarea } from './components/atoms/Inputs/Textarea/Textarea';
10
+ export { default as Radio } from './components/atoms/Radio/Radio';
10
11
  export { default as RatingStar } from './components/atoms/RatingStar/RatingStar';
11
12
  export { default as SegmentedButton } from './components/atoms/SegmentedButton/SegmentedButton';
12
13
  export { default as SelectedValue } from './components/atoms/SelectedValue/SelectedValue';
@@ -59,6 +60,7 @@ export { default as DateTimePicker } from './components/organisms/DateTimePicker
59
60
  export { Dialog } from './components/organisms/Dialog/Dialog';
60
61
  export * from './components/organisms/DialogBookingAddItem';
61
62
  export * from './components/organisms/DialogBookingConfirm';
63
+ export * from './components/organisms/DialogBookNow/DialogBookNow';
62
64
  export * from './components/organisms/DialogCancelService';
63
65
  export { DialogComparison } from './components/organisms/DialogComparison/DialogComparison';
64
66
  export * from './components/organisms/DialogDeleteConfirm';
@@ -112,6 +114,7 @@ export type { TopNavigationProps } from './components/organisms/TopNavigation/To
112
114
  export type { TransferLineData, TransferLineProps, TransferType, } from './components/organisms/TransferLine/TransferLine';
113
115
  export type { CheckboxProps } from './components/atoms/Checkbox/Checkbox';
114
116
  export type { InputProps } from './components/atoms/Inputs/Input/Input';
117
+ export type { RadioProps } from './components/atoms/Radio/Radio';
115
118
  export type { AddItemButtonProps } from './components/molecules/AddItemButton/AddItemButton';
116
119
  export type { AgeSelectorProps } from './components/molecules/AgeSelector/AgeSelector';
117
120
  export type { BreadcrumbsItem, BreadcrumbsProps, } from './components/molecules/Breadcrumbs/Breadcrumbs';
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ export { default as Icon } from './components/atoms/Icon/Icon';
8
8
  export { default as DropdownInput } from './components/atoms/Inputs/DropdownInput/DropdownInput';
9
9
  export { default as Input } from './components/atoms/Inputs/Input/Input';
10
10
  export { default as Textarea } from './components/atoms/Inputs/Textarea/Textarea';
11
+ export { default as Radio } from './components/atoms/Radio/Radio';
11
12
  export { default as RatingStar } from './components/atoms/RatingStar/RatingStar';
12
13
  export { default as SegmentedButton } from './components/atoms/SegmentedButton/SegmentedButton';
13
14
  export { default as SelectedValue } from './components/atoms/SelectedValue/SelectedValue';
@@ -61,6 +62,7 @@ export { default as DateTimePicker } from './components/organisms/DateTimePicker
61
62
  export { Dialog } from './components/organisms/Dialog/Dialog';
62
63
  export * from './components/organisms/DialogBookingAddItem';
63
64
  export * from './components/organisms/DialogBookingConfirm';
65
+ export * from './components/organisms/DialogBookNow/DialogBookNow';
64
66
  export * from './components/organisms/DialogCancelService';
65
67
  export { DialogComparison } from './components/organisms/DialogComparison/DialogComparison';
66
68
  export * from './components/organisms/DialogDeleteConfirm';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mautourco-components",
3
- "version": "0.2.165",
3
+ "version": "0.2.167",
4
4
  "private": false,
5
5
  "description": "Bibliothèque de composants Mautourco pour le redesign",
6
6
  "main": "dist/index.js",
@@ -10,3 +10,7 @@
10
10
  }
11
11
  }
12
12
  }
13
+
14
+ .resume-accom__rooms {
15
+ @apply space-y-4;
16
+ }
@@ -14,7 +14,7 @@ export interface ResumeAccomProps {
14
14
  image: string;
15
15
  dates: string[];
16
16
  clientType: string;
17
- pax: BookingPax;
17
+ pax: BookingPax[];
18
18
  hotelName: string;
19
19
  rooms: Partial<RoomItem>[];
20
20
  }
@@ -37,22 +37,24 @@ export function ResumeAccom(props: ResumeAccomProps) {
37
37
  <Text variant="medium" size="sm" leading="4">
38
38
  <strong>Client types:</strong> {clientType}
39
39
  </Text>
40
- <PaxDisplay pax={pax} />
41
- <div>
40
+ <div className="resume-accom__rooms">
42
41
  {rooms.map((room, index) => (
43
- <div key={`rm-${index}`} className="space-y-1">
44
- <TextWithIcon icon="accom" textSize="sm" textVariant="medium">
45
- {room.RoomName}
46
- </TextWithIcon>
47
- <ServiceInfo.Item
48
- icon="utensils"
49
- iconSize="sm"
50
- textSize="sm"
51
- textLeading="4"
52
- textVariant="medium"
53
- label="Meal-Plan">
54
- {room.MealPlan}
55
- </ServiceInfo.Item>
42
+ <div key={`rm-${index}`}>
43
+ <PaxDisplay pax={pax[index]} />
44
+ <div className="space-y-1">
45
+ <TextWithIcon icon="accom" textSize="sm" textVariant="medium">
46
+ {room.RoomName}
47
+ </TextWithIcon>
48
+ <ServiceInfo.Item
49
+ icon="utensils"
50
+ iconSize="sm"
51
+ textSize="sm"
52
+ textLeading="4"
53
+ textVariant="medium"
54
+ label="Meal-Plan">
55
+ {room.MealPlan}
56
+ </ServiceInfo.Item>
57
+ </div>
56
58
  </div>
57
59
  ))}
58
60
  </div>
@@ -69,3 +69,10 @@
69
69
  );
70
70
  }
71
71
  }
72
+
73
+ .booking-docket__date-range {
74
+ @apply flex flex-col;
75
+ @media (width > 1280px) {
76
+ @apply flex-row items-center justify-between;
77
+ }
78
+ }
@@ -96,7 +96,7 @@ export function BookingDocket(props: BookingDocketProps) {
96
96
  </Heading>
97
97
  <img src={logo} alt="Mautourco Logo" width={150} />
98
98
  </div>
99
- <div className="flex flex-col xl:flex-row gap-x-4 xl:items-center">
99
+ <div className="booking-docket__date-range">
100
100
  <Text variant="bold" size="lg">
101
101
  Booking file date range :
102
102
  </Text>