mautourco-components 0.2.166 → 0.2.168

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,20 @@
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
+ }
24
+
25
+ .resume-accom__content {
26
+ margin-top: 1rem;
27
+ }
28
+
29
+ .resume-accom__content > :not([hidden]) ~ :not([hidden]) {
30
+ --tw-space-y-reverse: 0;
31
+ margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
32
+ margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
33
+ }
@@ -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: "resume-accom__content", 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mautourco-components",
3
- "version": "0.2.166",
3
+ "version": "0.2.168",
4
4
  "private": false,
5
5
  "description": "Bibliothèque de composants Mautourco pour le redesign",
6
6
  "main": "dist/index.js",
@@ -10,3 +10,11 @@
10
10
  }
11
11
  }
12
12
  }
13
+
14
+ .resume-accom__rooms {
15
+ @apply space-y-4;
16
+ }
17
+
18
+ .resume-accom__content {
19
+ @apply space-y-2 mt-4;
20
+ }
@@ -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
  }
@@ -31,28 +31,30 @@ export function ResumeAccom(props: ResumeAccomProps) {
31
31
  image={image}
32
32
  className="resume-accom">
33
33
  <ServiceTitle title={hotelName} />
34
- <div className="space-y-2 mt-4">
34
+ <div className="resume-accom__content">
35
35
  <DateDisplay dates={dates} colorMode="green" />
36
36
  <TextWithIcon icon="night">{stay} Nights</TextWithIcon>
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>