mautourco-components 0.2.169 → 0.2.171
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/molecules/BookingPax/BookingPaxAccom.js +1 -1
- package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.js +1 -1
- package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.css +6 -0
- package/dist/components/molecules/BookingPax/BookingPaxRemarks.js +1 -1
- package/dist/components/organisms/PaxSelector/PaxSelector.js +5 -0
- package/package.json +1 -1
- package/src/components/molecules/BookingPax/BookingPaxAccom.tsx +1 -1
- package/src/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.tsx +1 -1
- package/src/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.css +3 -0
- package/src/components/molecules/BookingPax/BookingPaxRemarks.tsx +1 -1
- package/src/components/organisms/PaxSelector/PaxSelector.tsx +6 -0
|
@@ -30,7 +30,7 @@ export function BookingPaxAccom(props) {
|
|
|
30
30
|
}, [changeOptions, onPaxChange]);
|
|
31
31
|
return (_jsxs(BookingPaxLayout, { title: "Accommodation", icon: "accom", className: "booking-pax-accom", header: _jsx(BookingPaxHeader, { children: _jsx(BookingPaxHeader.Name, { name: hotelName, icon: "accom", location: roomName }) }), children: [roomData.map(function (_a) {
|
|
32
32
|
var room = _a.room, roomIndex = _a.roomIndex;
|
|
33
|
-
return (_jsxs("div", { className: "
|
|
33
|
+
return (_jsxs("div", { className: "booking_spacing-y-2", children: [_jsxs(TextWithIcon, { icon: "accom", children: ["Room ", roomIndex + 1] }), _jsx(BookingPaxClient, { id: "accommodation-".concat(roomIndex), clients: clientsInfo, selectedClientsInfoIds: selectedClientsInfoIds, selectedIndex: roomIndex, paxCount: room.paxCount, onPaxChange: onPaxOptionsChange, isSubmitted: isSubmitted, onError: function (hasError) {
|
|
34
34
|
onError === null || onError === void 0 ? void 0 : onError(roomIndex, hasError);
|
|
35
35
|
} })] }, "rm-".concat(roomIndex)));
|
|
36
36
|
}), _jsx(BookingPaxRemarks, { onChange: onRemarkChange })] }));
|
|
@@ -102,7 +102,7 @@ export function BookingPaxClient(props) {
|
|
|
102
102
|
useEffect(function () {
|
|
103
103
|
onError === null || onError === void 0 ? void 0 : onError(hasError && clients.length !== paxCount);
|
|
104
104
|
}, [hasError]);
|
|
105
|
-
return (_jsxs("div", { className: "
|
|
105
|
+
return (_jsxs("div", { className: "booking_spacing-y-2", children: [_jsxs(Text, { children: ["Please confirm the pax which applies on this service (", paxCount, " Pax)", ' ', _jsx(Text, { color: "state-error", as: "span", children: "*" })] }), _jsx("div", { className: cn('booking-pax-client', {
|
|
106
106
|
'booking-pax-accom--error': hasError,
|
|
107
107
|
}), children: clients.map(function (client) {
|
|
108
108
|
var isSelected = isSelectedClient(selectedIndex, client.clientId);
|
|
@@ -26,4 +26,10 @@
|
|
|
26
26
|
--tw-space-y-reverse: 0;
|
|
27
27
|
margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));
|
|
28
28
|
margin-bottom: calc(2rem * var(--tw-space-y-reverse));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.booking-pax-layout__content .booking_spacing-y-2 > :not([hidden]) ~ :not([hidden]) {
|
|
32
|
+
--tw-space-y-reverse: 0;
|
|
33
|
+
margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
|
|
34
|
+
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
|
|
29
35
|
}
|
|
@@ -33,5 +33,5 @@ export function BookingPaxRemarks(props) {
|
|
|
33
33
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
34
34
|
adjustHeight();
|
|
35
35
|
};
|
|
36
|
-
return (_jsxs("div", { className: "
|
|
36
|
+
return (_jsxs("div", { className: "booking_spacing-y-2", children: [_jsx(Text, { size: "sm", children: "Remarks" }), _jsx(Textarea, { ref: textareaRef, placeholder: "Do you have any remarks?", onInput: handleChange, className: "resize-none overflow-hidden", rows: 1, style: { minHeight: '44px', height: '44px', lineHeight: '1.5' } })] }));
|
|
37
37
|
}
|
|
@@ -84,6 +84,11 @@ function PaxSelector(_a) {
|
|
|
84
84
|
setInternalData(__assign(__assign({}, internalData), { adults: minAdults, teens: minTeens, children: minChildren, infants: minInfants }));
|
|
85
85
|
}
|
|
86
86
|
}, [minAdults, minTeens, minChildren, minInfants]);
|
|
87
|
+
useEffect(function () {
|
|
88
|
+
if (defaultPaxData) {
|
|
89
|
+
setInternalData(defaultPaxData);
|
|
90
|
+
}
|
|
91
|
+
}, [defaultPaxData]);
|
|
87
92
|
// Manage age arrays in single mode when counts change
|
|
88
93
|
useEffect(function () {
|
|
89
94
|
if (!multipleRooms) {
|
package/package.json
CHANGED
|
@@ -118,7 +118,7 @@ export function BookingPaxAccom(props: BookingPaxAccomProps) {
|
|
|
118
118
|
</BookingPaxHeader>
|
|
119
119
|
}>
|
|
120
120
|
{roomData.map(({ room, roomIndex }) => (
|
|
121
|
-
<div key={`rm-${roomIndex}`} className="
|
|
121
|
+
<div key={`rm-${roomIndex}`} className="booking_spacing-y-2">
|
|
122
122
|
<TextWithIcon icon="accom">Room {roomIndex + 1}</TextWithIcon>
|
|
123
123
|
|
|
124
124
|
<BookingPaxClient
|
|
@@ -219,7 +219,7 @@ export function BookingPaxClient(props: BookingPaxClientProps) {
|
|
|
219
219
|
}, [hasError]);
|
|
220
220
|
|
|
221
221
|
return (
|
|
222
|
-
<div className="
|
|
222
|
+
<div className="booking_spacing-y-2">
|
|
223
223
|
<Text>
|
|
224
224
|
Please confirm the pax which applies on this service ({paxCount} Pax){' '}
|
|
225
225
|
<Text color="state-error" as="span">
|
|
@@ -202,6 +202,12 @@ function PaxSelector({
|
|
|
202
202
|
}
|
|
203
203
|
}, [minAdults, minTeens, minChildren, minInfants]);
|
|
204
204
|
|
|
205
|
+
useEffect(() => {
|
|
206
|
+
if (defaultPaxData) {
|
|
207
|
+
setInternalData(defaultPaxData);
|
|
208
|
+
}
|
|
209
|
+
}, [defaultPaxData]);
|
|
210
|
+
|
|
205
211
|
// Manage age arrays in single mode when counts change
|
|
206
212
|
useEffect(() => {
|
|
207
213
|
if (!multipleRooms) {
|